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

Quicker access to user token

Hello, 

 

I am an independent developer trying to build an application that will display some fitbit data. I have reached a bottleneck point where If my users want to have there fitbit data displayed on my app they would need to come to the fitbit api website, and generate their token on their own. Am I missing something or is their an easier way for them to log in to my application and then log in to fitbit so they can see their stats displayed on my website? I am still new to the fitbit api so if this is an obvious question please excuse my ignorance. 

Best Answer
0 Votes
1 REPLY 1

Hi @evansrm5 

 

In order to receive your user's data, they need to consent to share their data with your application.  In your application, you'll need to implement one of the authorization flows.  We recommend the authorization code grant flow with/out PKCE.  Once implemented, the user will click on the authorization URL from your application, consent which data (or scopes) they want to share with your application, which generates an access token.   This access token is used with each API call to retrieve the user data.

 

If you have questions about how to implement the authorization flow, please let us know.

 

Best,

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer