# Invalid Authorization header to obtain authorization token

**URL:** <http://forum.companieshouse.gov.uk/t/invalid-authorization-header-to-obtain-authorization-token/7981>\
**Category:** API Issues\
**Created:** [May 26, 2024, 6:08am UTC](http://forum.companieshouse.gov.uk/t/invalid-authorization-header-to-obtain-authorization-token/7981 "2024-05-26T06:08:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakkaiah.madipalli](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/b/779978/32.png) [@bakkaiah.madipalli](http://forum.companieshouse.gov.uk/u/bakkaiah.madipalli)\
**Post date:** [May 26, 2024, 6:08am UTC](http://forum.companieshouse.gov.uk/t/invalid-authorization-header-to-obtain-authorization-token/7981/1 "2024-05-26T06:08:57Z")

</div>

Unable to obtain the authorization code using getting the below errror

 ![image](http://discourselive.s3.dualstack.eu-west-1.amazonaws.com/original/2X/3/33c47e5380cecb05749581126d06607f68119d58.png)

trying mimic the documentation to obtain the authorization token  
POST /oauth2/token HTTP/1.1

grant\_type=authorization\_code&  
code=authorization-code&  
client\_id=your-client-id&  
client\_secret=your-client-secret&  
redirect\_uri=application-redirect-uri  
request you to help what we are missing here and guide .
