# Python Get request

**URL:** <http://forum.companieshouse.gov.uk/t/python-get-request/370>\
**Category:** Uncategorized\
**Created:** [December 3, 2015, 2:21pm UTC](http://forum.companieshouse.gov.uk/t/python-get-request/370 "2015-12-03T14:21:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![c\_terrier](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/c/43a26b/32.png) [@c\_terrier](http://forum.companieshouse.gov.uk/u/c_terrier)\
**Post date:** [December 3, 2015, 2:21pm UTC](http://forum.companieshouse.gov.uk/t/python-get-request/370/1 "2015-12-03T14:21:04Z")

</div>

Hi,  
I’m trying to access officers information by using the python get request, but keep having the 401 error message when using the following code:

response = requests.get(“[https://api.companieshouse.gov.uk/company/07166427/officers](https://api.companieshouse.gov.uk/company/07166427/officers)”,  
headers = {“Authorization”: “my\_key\_here”}  
)

Any idea why?  
Thanks!  
Camille

---

<div class="post-metadata">

**Author:** ![mfairhurst](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/m/bbce88/32.png) [@mfairhurst](http://forum.companieshouse.gov.uk/u/mfairhurst)\
**Post date:** [December 7, 2015, 1:35pm UTC](http://forum.companieshouse.gov.uk/t/python-get-request/370/2 "2015-12-07T13:35:43Z")

</div>

@c_terrier

I suspect that the issue maybe the way the authorisation key is being presented. Hopefully the attached forum post has some answers. Ensure that the colon is added to the end of your API key and that its base 64 encoded.

> [@Authentication Issue](http://forum.aws.chdev.org/t/authentication-issue/322):
>
> Hi, I am new to Companies House API. I want to authenticate my application with companies house API to get/use companies House website data in my salesforce application. For this, I have to authenticate my application with companies House API. How can I do this? Any help will be appreciated…

If this doesn’t help then please let me know.

Thanks,

Mark.
