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

Unable to get access token using auth code via authorization code flow

I got the authorization code by following steps on

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

 

But when I try to fetch access token , i get below error

{

"errors":
 {
"errorType": "invalid_grant"
"message": "Authorization code invalid: <AUTHORIZATION_CODE> Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
"success": false

}

 

I have tried multiple times (hurl via https://dev.fitbit.com/apps/oauthinteractivetutorial, chrome ARC etc)

But neither worked.

Can somebody help.

I had filled in all params as given at,

https://dev.fitbit.com/build/reference/web-api/oauth2/#access-token-request

 

Best Answer
0 Votes
2 REPLIES 2

grant_type for revoke access token is refresh token I think your refresh token is not valid

Best Answer
0 Votes

The response indicates that there is an error in the `code` request parameter provided. Can you confirm that you are providing the correct request parameters? You can use the authorization code to get an access token only once. If you have used it already; you will need to go back a step and generate a new authorization code. The oauth2 interactive tutorial should provide you with a sample curl statements at each step.

 

 

P.S. I have redacted the authorization code from your post. Please refrain from sharing sensitive information in the community forum

Best Answer
0 Votes