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

Unable to retrieve the refresh token

This is what my request for refresh token request looks like :

 

https://api.fitbit.com/oauth2/token?grant_type=refresh_token&refresh_token=470595744ae06e55a8dc9e3f2...

 

with headers set as below key value pairs

 

"Content-Type", "application/x-www-form-urlencoded"

"Authorization", "Basic 470595744ae06e55a8dc9e3f2c8f3c90bcc1996e68813f7005a090eca9dd84f3"

 

"470595744ae06e55a8dc9e3f2c8f3c90bcc1996e68813f7005a090eca9dd84f3" is the refresh_token received in the previous call auth call

 

I get the error HTTP error code : 401. Can you please let me know if I am missing something

Best Answer
0 Votes
3 REPLIES 3

The Authorization header doesnt appear to be built correctly, please see:

https://dev.fitbit.com/docs/oauth2/#access-token-request

Best Answer
0 Votes

Thanks Dan, for your response. When I make the request ecoding the authorization header as described in the link that you shared, I am getting an error code 400.

 

Best Answer
0 Votes

@PalsN wrote:

Thanks Dan, for your response. When I make the request ecoding the authorization header as described in the link that you shared, I am getting an error code 400.

 


What are you getting in the response body for the request?

Best Answer
0 Votes