# 401 Error: Accessing API through KNIME

**URL:** <http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211>\
**Category:** API Issues\
**Created:** [June 23, 2017, 3:11pm UTC](http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211 "2017-06-23T15:11:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![voracityemail](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/v/b77776/32.png) [@voracityemail](http://forum.companieshouse.gov.uk/u/voracityemail)\
**Post date:** [July 24, 2017, 3:25pm UTC](http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211/4 "2017-07-24T15:25:19Z")

</div>

(Since no-one replied) I don’t know / use [KNIME](https://www.knime.org/) and don’t use java to access CH but but since you’ve got a 401 error I suspect the issue is the user authentication isn’t being sent / fields are being sent incorrectly / http authentication header is not right. The link you posted above asks me for my KNIME login to read it so I haven’t.

I don’t see why using java would come into it - unless you’ve worked out that the java compiler and/or runtime version has a bug? In which case tell Oracle too.

The only other comms. issue I’ve come across is the [certificate chain not matching those supplied by CH](http://forum.aws.chdev.org/t/testing-without-ssl/1117/4) - but that should give you a different error.

(From a _very_ cursory look at the [KNIME docs](https://www.knime.org/files/node-documentation/index.html)):  
Presumably to get the data you’re using the IO → File handling → Remote → Connections → Remote connection node to get the data (e.g. as in [https://www.knime.org/files/node-documentation/org.knime.base.filehandling.remote.connectioninformation.node.https.HTTPSConnectionInformationNodeFactory.html](https://www.knime.org/files/node-documentation/org.knime.base.filehandling.remote.connectioninformation.node.https.HTTPSConnectionInformationNodeFactory.html))? If so, that seems to allow authentication, but it doesn’t go into exactly how it’s doing that so I’d check the http header that’s getting sent. It should be [as per the API documentation](https://developer.companieshouse.gov.uk/api/docs/index/gettingStarted/apikey_authorisation.html) e.g. the username CH supply and a blank password.

(You might even be able to get KNIME to report on this as it’s got a [IO → File handling → Remote → URI → Extract URI info](https://www.knime.org/files/node-documentation/org.knime.base.filehandling.extracturiinfo.ExtractURIInfoNodeFactory.html) node).

It looks (from my 10 minute scan) as if KNIME _should_ be capable of communicating with CH. It even looks like there’s a node for an Amazon S3 Connection so you may be able to download document images / additional financial data should you wish.

And finally - and apologies if you gave detailed info in your link above: [http://testthewebforward.org/docs/bugs.html](http://testthewebforward.org/docs/bugs.html)

Good luck.  
Chris

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/401-error-accessing-api-through-knime/1211)._
