09-04-2019 05:53
09-04-2019 05:53
How to get our specifc user details or all friends details.
Like I want to get the Profile or Bages earned by my friends so if in endpoint I try to amend their userid (encodedid), I get error stating insufficient permissions. Can anyone help me here what endpoint should be used or what permissions should be enabled.
Endpoint currently being used: https://api.fitbit.com/1/user/-/profile.json
09-10-2019 07:31
09-10-2019 07:31
To retrieve your friends information, your friends needs to authorize content to share their data with your application. Your application needs to execute the Outh2 authorize endpoint which presents the scopes to the user. The user will need to select profile for you to get the badges. Once they have consented to share this data, your application will receive an access token which you'll specify when executing the Get Profile endpoint.
If you need more information, please let us know.
Gordon
06-09-2020 15:22 - edited 06-09-2020 15:37
06-09-2020 15:22 - edited 06-09-2020 15:37
Just to clarify...
If I want to get get badges for several friends, does each friend have to consent to share using my app on my device? Then will I get separate access tokens (and refresh tokens) for each user ID and use their specific access token when executing the Get Profile endpoint? Or, does each friend give consent to share using my app on their device, and my app stores their separate access tokens (and refresh tokens) in a centralized database?
Thanks in advance,
Phil
06-10-2020 11:03
06-10-2020 11:03
Hi @pwstern,
You're correct. When each user gives consent to share their data using your app on their device, your app stores their tokens on a server or centralized database. During the authorization process, the auth code is sent to your redirect URI, which generally where this process is hosted.
I hope this helps. Let me know if you have any additional questions.