04-25-2021 12:47 - edited 04-25-2021 15:26
04-25-2021 12:47 - edited 04-25-2021 15:26
When I execute the following from the Windows cmd window:
curl -i -H "Authorization: Bearer <token>" https://api.fitbit.com/1/user/-/profile.json
The result is:
HTTP/1.1 200 OK
Date: Sun, 25 Apr 2021 19:29:46 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Fitbit-Rate-Limit-Limit: 150
Fitbit-Rate-Limit-Remaining: 150
Fitbit-Rate-Limit-Reset: 1814
X-Frame-Options: SAMEORIGIN
Via: 1.1 google
CF-Cache-Status: DYNAMIC
cf-request-id: 09ac1b74320000fbbc43144000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 6459fb66bd31fbbc-MCI
{<lengthy json string with the expected profile details>}
But when I run this:
curl -i -H "Authorization: Bearer <token>" https://api.fitbit.com/1/user/-/activities/steps/date/2021-04-25/1d/1min.json
The result is:
HTTP/1.1 500 Internal Server Error
Date: Sun, 25 Apr 2021 19:26:27 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Origin,Accept-Encoding
Cache-control: no-cache, private
Content-Language: en
Fitbit-Rate-Limit-Limit: 150
Fitbit-Rate-Limit-Remaining: 150
Fitbit-Rate-Limit-Reset: 2013
X-Frame-Options: SAMEORIGIN
Via: 1.1 google
CF-Cache-Status: DYNAMIC
cf-request-id: 09ac186bf900007ac85fad5000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 6459f68ccc1f7ac8-MCI
{"errors":[{"errorType":"request","fieldName":"n/a","message":null}],"success":false}
https://www.fitbitstatus.com/ indicates that all systems are operational. I reauthorized my client with full access because my previous access has expired. I updated the <token>, which would have failed for both the call to profile.json and activities/steps/.../1min.json if it were a problem with the token. These calls both have worked in the past but now activities/steps is failing. Does anyone have any suggestions?
04-28-2021 08:39
04-28-2021 08:39
Typically when you receive a 500 error, you should wait a moment and try to execute the endpoint again. I cannot reproduce the error with my own account. So, you would please try executing the endpoint again and let me know the results?
Best,
Gordon
04-29-2021 07:08
04-29-2021 07:08
Thank you for looking into this issue. I have a support ticket for this as well. I'll provide a similar reply here that I did for them. For me it is occurring for the dates 4/25/21, 4/26/21 and 4/27/21. Now I've tried 4/28/21 and 4/29/21 and they all are failing. I ran into this problem a week or so ago (I'm not sure what the dates were but again it was for two or three sequential dates) and it seemed to go away on its own. I'm thinking it's actually an authorization problem. I don't understand the OAuth process very well.
04-29-2021 10:03
04-29-2021 10:03
To stop duplicating efforts, we will continue to work with you through the support ticket. I'll update the forum post after the problem is resolved.