Python Get request

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”,
headers = {“Authorization”: “my_key_here”}
)

Any idea why?
Thanks!
Camille

@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.

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

Thanks,

Mark.