# Invalid Authorization Header

**URL:** <http://forum.companieshouse.gov.uk/t/invalid-authorization-header/7328>\
**Category:** API Issues\
**Created:** [January 15, 2024, 11:20am UTC](http://forum.companieshouse.gov.uk/t/invalid-authorization-header/7328 "2024-01-15T11:20:12Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![gajdonid](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/g/41988e/32.png) [@gajdonid](http://forum.companieshouse.gov.uk/u/gajdonid)\
**Post date:** [January 19, 2024, 12:15pm UTC](http://forum.companieshouse.gov.uk/t/invalid-authorization-header/7328/6 "2024-01-19T12:15:52Z")

</div>

Dear @azamat.ilyassov ,

firstly you need to generate an API\_Key at your Developer Hub account([How to regenerate an API Key - #3 by MArkWilliams](https://forum.aws.chdev.org/t/how-to-regenerate-an-api-key/1126/3)).  
Then the request in Python is straightforward:  
r = requests.get(url, auth=(API\_Key , “”))

where API\_Key is the generated API\_Key by which the server authenticates you.

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/invalid-authorization-header/7328)._
