05-21-2021 06:23
05-21-2021 06:23
I am trying to build an app that uses Fitbit Web API. I was testing the OAuth 2.0 APIs and, at a certain point, step 1A stopped working. I thought that the problem was my app, so I went to the tutorial page and used curl requests (which I used befor and worked), receiving the same strange error.
The authorization URL (https://www.fitbit.com/oauth2/authorize?...) works. The redirection works, and I obtain a code, but when I try to make the next request:
curl -i -X POST \
-H 'Authorization: Basic ****' \
--data "clientId=****" \
--data "grant_type=authorization_code" \
--data "redirect_uri=****" \
--data "code=****" \
-H 'Content-Type: application/x-www-form-urlencoded' \
https://api.fitbit.com/oauth2/tokenI obtain the following response:
{"errors":[{"errorType":"request","fieldName":"n/a","message":null}],"success":false}What could be the problem, given that I even used curl requests by copying and pasting them from the tutorial itself?
Best Answer06-02-2021 10:30
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.
06-02-2021 10:30
Hi @luca_diba
Would you please try resetting your client secret and try again?
Thanks!
Gordon
Best Answer