Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Invalid authorization header format" but client ID is correct

ANSWERED

Hello,

 

We're building a fitbit integration for our application.

When POSTing to https://api.fitbit.com/oauth2/token we're receiving this response:

 

{'errors': [{'errorType': 'invalid_client', 'message': "Invalid authorization header format. The client id was not provided in proper format inside Authorization Header. Received authorization header = Basic b'<AUTHORIZATION>',  received client encoded id = <CLIENT_ID>. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}], 'success': False}

 

The interesting thing about this issue is the "received client encoded id" is actually our correct client id, indicating that our header is properly encoded. It feels as if our registered application is not actually registered correctly. The application name is "Breadcrumbs" if that's useful.

 

Thanks in advance.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Just fixed it. In python, I had:

 

"Authorization": f"Basic {auth_header}"

 

I needed:

 

"Authorization": f"Basic {auth_header.decode()}"

 

Hopefully this helps someone.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Just fixed it. In python, I had:

 

"Authorization": f"Basic {auth_header}"

 

I needed:

 

"Authorization": f"Basic {auth_header.decode()}"

 

Hopefully this helps someone.

Best Answer
0 Votes