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

Error 500 when calling activity data

ANSWERED

Hi - I run into error status 500 when fetching the daily activity data, starting from June 24. Specifically, when I called any of the following activity paths:

 

activities/minutesSedentary activities/minutesLightlyActive activities/minutesFairlyActive activities/minutesVeryActive<code></code>

 

 

I got an error like this:

"{\"errors\":[{\"errorType\":\"request\",\"fieldName\":\"500\",\"message\":\"An error occurred with the Fitbit Web API while processing the request. Error id: 6CA2F689:29DD_A92D91CB:01BB_5B3ABFCD_8F175C87:4F74\"}],\"success\":false}"

My tokens are valid and I have no problems accessing other paths. Could you help me understand what this means and how to solve it? Thank you!

 

UPDATE:

@GordonFitbit helped figure this out - it's because I queried too many dates in a single call. After shortening the search period my code works again.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @JohnSnow2018,

 

Are you seeing this error every time to execute activity calls with the provided paths?  When was the last time this error occurred?  Would you please private message me your Client ID and I'll do some investigation on our side?

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
5 REPLIES 5

I'm getting an Error code 521 having something to do with Cloudfare. I've tried different browsers, clearing data and still no luck or help from Fitbit in getting this fixed. I was wondering if other people are having the same error.

Best Answer
0 Votes

Hi @JohnSnow2018,

 

Are you seeing this error every time to execute activity calls with the provided paths?  When was the last time this error occurred?  Would you please private message me your Client ID and I'll do some investigation on our side?

 

 

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

Hi @AJanice,

 

I'll be happy to help you out.  I research the Cloudflare error message and found this document: https://support.cloudflare.com/hc/en-us/articles/200171916.

 

If you private message me your Client ID and IP Address, I'll try to confirm we are not blocking you.

 

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

After some research, we realized the query being executed contained a date range for about 2.5 years.  The Fitbit servers have a limit on the amount of data that can be returned.  The solution is to shorten the date range on the query.

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
Thanks but I’m only trying to access current data range or past week at most.

Sent from my iPhone
Best Answer
0 Votes