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

FITBIT API

I am an iOS developer and integrating the Fitbit apis in one of my app. I was successful in getting data and everything worked but I am stucked with a limit problem issue. I know there is a limit of 150 calls per hour per user but its happening too early. I am using two accounts for the testing purposes and one of the account gives this error too early even we have not call the api 150 times. I need to deliver that app to my client and stucked in this issue from weeks please help me in this. How can we utilise the limit in a best way and also is there a way to increase the limit too ? So, whats the best method to get the data in order to remove this limit error ? My client wants to get updated after every 5 seconds.

 

Will be waiting for your reply soon.

 

Best Regards

Best Answer
0 Votes
4 REPLIES 4

Hi @kayhan234,

 

It's possible you are executing a single API call multiple times when you could execute it in a more efficient manner to get the same output.  Would you describe how your application is retrieving data through the APIs, how often you're executing these API calls and what your goal is?

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

Hi @kayhan234.  Also, is there a reason why your application needs to get updated every 5 seconds?  The Fitbit devices will automatically sync with your mobile device or computer over bluetooth every 15 minutes.  You can use the Subscriptions API (https://dev.fitbit.com/build/reference/web-api/subscriptions/) to be notified when a user has updated their data through manual or automatic syncs. When your application receives the notification, you can pull the specific data that has been updated.  This will prevent the need from constantly polling for new data.  

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes
We are calling the api after every 5 seconds to get the data to our app.


We are retrieving the data through the end points mentioned in your
document.


We are getting data but its not syncing every-time and also the heart rate
data synch some times and some times that key is doesn't even respond.



Our goal is to use it during the exercise so we can see our stats of heart
rate, calories burn and steps taken during the exercise.
Best Answer
0 Votes

Are you using the subscription APIs to be notified when data has been updated?  Sometimes it might take a few moments for the notifications to appear after the sync has occurred.  

 

By calling the API every 5 seconds, are you trying to get real-time or near real-time data so you can get the stats during the exercise?  The Web APIs weren't designed for real-time data access.  If you're building an application on the Ionic or Versa, the Device API might be better suited for seeing real-time data during the exercise.  When the exercise is complete, you can sync the data collected over the Web APIs.

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