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

FitBit subscription API: where is the association made between user and app

I reviewed the following documentation: FitBit Subscription API

 

Let's say I go through the fitbit setup and create a subscription for my app. Next, someone joins my website using the oauth 2.0 login for fitbit and agrees to provide access to activities and heart rate.

 

When the person uses the fitbit api and their metrics are added to the fitbit system. How does the system know that my app's subscription api should get this person's metrics?

 

Are there any extra steps that are needed for this to occur or is it driven by the user approving my app to receive this information?

Best Answer
0 Votes
1 REPLY 1

Hi @Audrey39,

 

Welcome to the Forums!

 

The association is made when the user authorizes your application to access their data in the OAuth 2.0 consent flow. Without this consent, your application will not be able to receive updates for your subscriptions.

 

When a person syncs new data to their account, Fitbit will send your application a notification, which looks like this, based on the collection type you specified for your subscriptions. You'll then need to query the appropriate endpoint to fetch the new data from the user.

 

Implementing Fitbit Subscription API

Use the following step to implement Subscription API:

  1. Configure a simple notification URL as described in Receiving Update Notifications.

  2. Make sure your subscriber endpoint is accessible from fitbit.com servers.

  3. Configure your subscriber endpoints as described in Configure A Subscriber.

  4. Verify your subscriber endpoint as described in Verify A Subscriber.

  5. Authenticate Fitbit users on your site as described in the OAuth authentication API.

  6. Add subscriptions as described in Add A Subscription.

I hope this helps. Please let me know if you have any additional questions.

Best Answer
0 Votes