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

How to identify application user after authorise callback

Suppose a user from application database with user id 100 starts authorisation to Fitbit using endpoint http://localhost/api/100/fitbit/authorize and get authorised by callback http://localhost/api/fitbit/callback how can we identify which user got authorised so that we can store the access token and refresh token. callback url can not have user id 100 since Fitbit config does not allow to parameterise the url. Or is there any other way to identify the authorised user?

Best Answer
0 Votes
1 REPLY 1

When you call https://api.fitbit.com/oauth2/token to get your access token, the User ID should be returned as part of the response.  Trying playing with the OAuth 2.0 Tutorial Page (https://dev.fitbit.com/apps/oauthinteractivetutorial) to learn how the OAuth flow works.

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