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

postman error ,errortype:invalid_grant??

ANSWERED

(I'm Taiwanese,my grammar maybe not correct ><)

These days I've been learned how to use fitbit api~

Also,I watched some instructional video in youtube to help me understand how fitbit api work.

But today I encounter a problem in postman.😥

I import these info

 

Authorization:Basic MjM.........

Content-Type:application/x-www-form-urlencoded

code:2d68.......

grant_type:authorization_code

redirect_uri:https.........

 

than I got this

 

{
"errors": [
{
"errorType": "invalid_grant",
"message": "Authorization code invalid: 2d68......Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
}
],
"success": false
}
 
How can I fix mistakes?😥
thanks🙏

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @Sammmmmi,

 

Welcome to the forums!

 

The reason you are seeing this error is because the authorization code you're using was already used, or if you did not use it within 10 minutes. Auth codes have life duration of 10 minutes before it becomes invalidated.

 

I recommend going through the auth flow again and obtain a new authorization code. Exchange this code immediately to obtain the access_token and refresh_token pair.

 

Let me know if you need additional assistance.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Hi @Sammmmmi,

 

Welcome to the forums!

 

The reason you are seeing this error is because the authorization code you're using was already used, or if you did not use it within 10 minutes. Auth codes have life duration of 10 minutes before it becomes invalidated.

 

I recommend going through the auth flow again and obtain a new authorization code. Exchange this code immediately to obtain the access_token and refresh_token pair.

 

Let me know if you need additional assistance.

Best Answer
0 Votes