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

invalid_client using web api's oauth2 tutorial

Hi, I used my client_id & generated state from

https://dev.fitbit.com/build/reference/web-api/troubleshooting-guide/oauth2-tutorial/

to obtain a code successfully. The URL above shows that I can use the following curl snippet to obtain access tokens.

curl -i -X POST \
https://api.fitbit.com/oauth2/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data "grant_type=authorization_code" \
--data "code=30147ea68d6b05f08dbddf95409f02cb3671ced5" \
--data "client_id=..."

However executing it results in

{"errors":[{"errorType":"invalid_client","message":"Invalid authorization header format. The header was not recognized to be a valid header for any of known implementations or a client_id was not specified in case of a public client Received header = null. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}

May I ask for help with this? This should be the simplest of all applications, directly from fitbit's own tutorial.

 

Best Answer
0 Votes
1 REPLY 1

Hi @spicarus 

What application type did you specify when registering your application at dev.fitbit.com?

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes