10-20-2020 13:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-20-2020 13:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi! I want to allow my app's users to integrate with fitbit. My backend application should get users data regardless they are online. Can I store user tokens in my database after they authorized themself? Is it a good solution for this problem?
10-23-2020 08:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-23-2020 08:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Johndev
Integrating with the Web APIs sounds like the correct solution for you. After a user consents to share their data with your application, you'll receive an access token and a refresh token. You should store both of these items, and in a database is fine. The access token is used to fetch the user's data, and the refresh token is used to update the access token and refresh token when the access token expires. I recommend you implement the Subscription API so your application gets notified when the user has new data to download.
If you need more information, please let us know.
Gordon
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

