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

Too many request

ANSWERED

Im getting this error sometimes, and i have read somewhere that im allowed to do 150 requests per hour.

But when i get this error, i havent done 150 requests.

 

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@JimmyL Yes, the API requests are metered per user. So you can do up to 150 requests per user per hour. 🙂

Andrew | Community Moderator, Fitbit

What motivates you?

View best answer in original post

Best Answer
8 REPLIES 8

@JimmyL Rate limit is 150 requests per user per hour. Once that limit is reached the response will give you a 429. How do you know you haven't hit the limit?

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer

Well after been sleeping on it and recalculating i might have exeeded the limit. 🙂

 

Another question..

If my app has 200 users and i api calls for each of them in the night. I would very fast exceed the 150 requests to the API but that is possible because i use different user on each request right?

Best Answer
0 Votes

@JimmyL Yes, the API requests are metered per user. So you can do up to 150 requests per user per hour. 🙂

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer

😂

I am getting too many requests. And I only sent like 10.

 

                    [errorType] => system

                    [fieldName] => n/a

                    [message] => Too Many Requests

Best Answer
0 Votes

Hi @williambell9708,

 

Welcome to the forums!

 

Can you PM me your Client ID so I can check our logs to see why you're seeing this error?

Best Answer
0 Votes

Hi Jhon,

 

we have the same problem. Our Client ID is 22BGXS.

 

Thanks

Best Answer
0 Votes

Hi @Aduxia,

 

Welcome to the Forums!

 

Thanks for providing me with your Client ID, and I'll be happy to take a look. After checking our logs, I noticed you were executing individual API calls to get daily activity and sleep summaries for each day. You're also executing API calls within milliseconds of each other. By doing this, you'll meet the 150 API calls per hour limit per user fairly quickly.

 

Since you are fetching daily totals for individual days, I can suggest a few endpoints to make this process more efficient for you without having to exceed the hourly rate limit per user.

 

  • You can fetch up to 100 of the user's most recent activity logs by using the Get Activity Logs List endpoint using a before or after date in a single API call. 
  • If you're specifically looking for daily totals for calories, steps, floors, distance, etc, for a specified period of time (1 day, 7 days, 30 days, 1 week, 1 month, 3 months, 6 months, or1 year), you can execute the Get Activity Time Series endpoints.
  • You can fetch a user's sleep logs by date range using the Get Sleep Logs by Date Range endpoint. 
  • You can fetch a up to 100 of a user's most recent sleep logs by using the Get Sleep Logs List endpoint.

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

Best Answer
0 Votes

I'd like to download my minute-by-minute heartrate data, but the request limit of 150 per hour is only going to allow me to fetch 150 days each hour. What if I'm trying to analyze two years worth?

Best Answer
0 Votes