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

How to Sync data for several users in single call

We are exploring the option of integrating our application with fitbit API. Common structure we have is as, one Client having several users under it. We visited your api documentation, however could not find answers to following questions in order to proceed further:

  1.        Is there any API exposed using which user can register his device from our application?
  2.         In order to get access token user is redirected to fitbit site, where he is asked to allow or deny the sync request. Can this step be eliminated and the access token is returned in response to some API initiated from our application?
  3.        Is there any API exposed that allows to sync data for multiple user in single call?

Answers to above questions will help us to speed up the integration process.

Best Answer
0 Votes
2 REPLIES 2

The answer to all 3 questions is no.

 

1. Pairing of trackers must happen through a Fitbit application.

2. We require the full OAuth flow in order to get explicit permission from a user before granting an application access to their data.

3. If you have a computer with the sync dongle and the Fitbit Connect software installed, it will sync all trackers that are in range. The users do not need to login for the automatic background sync to happen; background sync happens roughly every 15-20 minutes. 

Best Answer
0 Votes

In regards to #2, you may have a misunderstanding.  The user only needs to authorize your application once.  You can (and should) store the values you get back for that user.  Until the user revokes your access (which they have the ability to do from their profile pages), you can continue to collect data.

 

So this isn't a real deal breaker.  Your application can check if you have their credentials stored.  If not, you request authorization.  Fitbit allows them to allow or deny it, and passes control back to you in a callback.  Then you get to use that indefinitely until the user revokes it.  Done right, it basically looks like they never leave your application, although the authorization page has the Fitbit logo and not yours.  But it is seamless from the user standpoint.

 

In regards to #3, consider using the subscription APIs.  Each time a user syncs (to Fitbit), you can get a real-time notification and turn around and request whatever data points you care about using the APIs back to Fitbit.  In essence, your database can always have current information on each of your users.  Well, as current as their last sync.  

Best Answer
0 Votes