# API Issues when sending key

**URL:** <http://forum.companieshouse.gov.uk/t/api-issues-when-sending-key/266>\
**Category:** API Issues\
**Created:** [September 14, 2015, 9:24am UTC](http://forum.companieshouse.gov.uk/t/api-issues-when-sending-key/266 "2015-09-14T09:24:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![csmith](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/csmith/32/8_2.png) [@csmith](http://forum.companieshouse.gov.uk/u/csmith)\
**Post date:** [September 14, 2015, 12:52pm UTC](http://forum.companieshouse.gov.uk/t/api-issues-when-sending-key/266/2 "2015-09-14T12:52:02Z")

</div>

Hi.

Authentication is described in the getting started guide, along with some detailed discussions on this forum. Do a search on the forum for “authentication”, there is a whole heap of detailed help.

I have noticed that the API Explorer does not show all of the request headers that are sent, one of which is the Authentication header, which would perhaps have been helpful. I will have that looked at.

Here are some key topic posts that should help you authenticate correctly.

[https://developer.companieshouse.gov.uk/api/docs/index/gettingStarted/apikey\_authorisation.html](https://developer.companieshouse.gov.uk/api/docs/index/gettingStarted/apikey_authorisation.html)

I would recommend posting any follow-up questions to the following post:

> [@Getting invalid authorization](http://forum.aws.chdev.org/t/getting-invalid-authorization/41/7):
>
> The existing XML Gateway API employs a custom authentication mechanism unique to Companies House, and involves the complex MD5 hashing of passwords and transaction ID’s. The new Companies House REST API uses standard [Basic HTTP Authorisation][1]. This makes API key authentication as simple as the following curl command: curl -v -uYOUR\_APIKEY\_FOLLOWED\_BY\_A\_COLON: https://api.companiseshouse.gov.uk/company/00002065 You may have to do a little more work in code, depending on whether your client…

> [@Help with Document API & Fetch a Document](http://forum.aws.chdev.org/t/help-with-document-api-fetch-a-document/255/2):
>
> Paul, Assuming you have identified the document you want from the filing history response, the steps are: Set your mandatory HTTP request headers. Accept: application/pdf Authorization: Basic your\_encoded\_key\_goes\_here Invoke [https://document-api.companieshouse.gov.uk/document/{transaction\_id}/content](https://document-api.companieshouse.gov.uk/document/%7Btransaction_id%7D/content) where transaction\_id relates to the document of interest in filing history response. E.g. [https://document-api.companieshouse.gov.uk/document/n1EjP\_MALLs8xZp5hs86iHcYDli0TE-n6t4HUDeZuq8/c…](https://document-api.companieshouse.gov.uk/document/n1EjP_MALLs8xZp5hs86iHcYDli0TE-n6t4HUDeZuq8/content)

Best regards,  
Chris

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/api-issues-when-sending-key/266)._
