02-05-2023 17:42
02-05-2023 17:42
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.
Answered! Go to the Best Answer.
02-05-2023 17:48
02-05-2023 17:48
Just fixed it. In python, I had:
"Authorization": f"Basic {auth_header}"
I needed:
"Authorization": f"Basic {auth_header.decode()}"
Hopefully this helps someone.
02-05-2023 17:48
02-05-2023 17:48
Just fixed it. In python, I had:
"Authorization": f"Basic {auth_header}"
I needed:
"Authorization": f"Basic {auth_header.decode()}"
Hopefully this helps someone.