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

Get Access token but not getting refresh token

ANSWERED

Hello everyone,

 

I am developing one fitness app in android. I want to add my app workout data on fitbit. I was successfully login in Fitbit using oAuth 2.0 My url is as below:

https://www.fitbit.com/oauth2/authorize?response_type=token&client_id="
+ clientId + "&redirect_uri=" + redirectUri + "&scope=" + scope

 and Im getting below response:

callback://android-****#scope=activity&user_id=*****&token_type=Bearer&expires_in=86152&access_token=***************HAiOjE0NjAxMTI3MjUsInNjb3BlcyI6IndhY3QiLCJzdWIiOiI0NjZTNzIiLCJhdWQiOiIyMjdIWDgiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJpYXQiOjE0NjAwMjY1NzN9.KV3zV0QjNHv0nmFAxGzd6OUp*********

I'm not getting refresh token. How I will refresh access token ? Please guide me where I am wrong or missing something ? 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hey, @466S72! Looks like you're using the implicit grant flow. The Implicit Grant Flow doesn't use refresh tokens and the user must re-authorize the application when the access token expires.

 

You may be looking for the Authorization Code Grant Flow.

View best answer in original post

Best Answer
1 REPLY 1

Hey, @466S72! Looks like you're using the implicit grant flow. The Implicit Grant Flow doesn't use refresh tokens and the user must re-authorize the application when the access token expires.

 

You may be looking for the Authorization Code Grant Flow.

Best Answer