04-11-2016 04:03
04-11-2016 04:03
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 ?
Answered! Go to the Best Answer.
Best Answer04-18-2016 09:50
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-18-2016 09:50
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.
04-18-2016 09:50
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-18-2016 09:50
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.