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

OAuth2 authorization code flow - All my access codes seems to be invalid

ANSWERED

Hello,

 

I'm experiencing some problems to get access tokens since this morning (OAuth2 authorization code grant flow, after getting the access code) : All my authorization code seems to be invalid.

 

I tried with 2 differents fitbit users to obtain access tokens several times using https://api.fitbit.com/oauth2/token and i'm getting this error :

 

{"errors":[{"errorType":"invalid_grant","message":"Authorization code invalid: 3e14c4756d3f4b6d5ed4340b7d19ffc60e14fbf8#success Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}

 

 

(All was fine yesterday, some users authenticated using this flow without any problems, according to my logs).

 

Is there an global issue on the process ? Everything was working fine since several weeks and i did not change a single line of code.

 

I can post more informations in case of this is not a global issue on the service.

 

Thanks in advance

 

Best Answer
0 Votes
20 REPLIES 20

I was having trouble using the Hurl.it on Step 1A, but when I copied and pasted into a terminal it worked.

 

curl -X POST -i -H 'Authorization: Basic redacted' -H 'Content-Type: application/x-www-form-urlencoded' -d "clientId=228YX6" -d "grant_type=authorization_code" -d "redirect_uri=https%3A%2F%2Flocalhost%2F" -d "code=245dd863874112c3fd1e20512c8a8c5a1bea2db1" https://api.fitbit.com/oauth2/token

We'll look into why Hurl.it is not working on that step.

Best Answer