08-16-2023 12:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-16-2023 12:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



08-22-2023 12:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @spicarus
What application type did you specify when registering your application at dev.fitbit.com?
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

