08-16-2023 12:05
08-16-2023 12:05
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.
08-22-2023 12:10
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
08-22-2023 12:10
Hi @spicarus
What application type did you specify when registering your application at dev.fitbit.com?
Gordon
Best Answer