07-24-2024 18:21 - edited 07-25-2024 07:17
07-24-2024 18:21 - edited 07-25-2024 07:17
My application started receiving 404s when requesting data from the Fitbit Web API starting on July 18th and continuing until now. There have been no recent updates to our code, and these our the first Fitbit API errors we've logged in many years.
Here's a sample request that
https://api.fitbit.com/1/user/-/activities/list.json&offset=0&sort=asc&limit=100&afterDate={date}
(Note received this error from your forum: The message body contains yy-mm-dd, which is not permitted in this community. Please remove this content before sending your post. yy-mm-dd is a date which I apparently can't include in this forum post.)
Response:
HTTP Status Code: 404
Returned JSON:
{ "error": { "code": 404, "message": "Requested entity was not found.", "status": "NOT_FOUND" } }
Was there a platform update corresponding to this date, and are there any changes we need to adapt to?
Answered! Go to the Best Answer.
07-25-2024 06:53
07-25-2024 06:53
Hi @smashrun
First, please don't post access tokens in the public community forums. If we need the token from you, we have a secure method for requesting it. Would you please edit your post and remove the token. I'm not able to do it.
It looks like you have a typo in your API call. The link to the documentation is https://dev.fitbit.com/build/reference/web-api/activity/get-activity-log-list/. There should be a ? between json and offset. So, the syntax would look like
https://api.fitbit.com/1/user/-/activities/list.json?offset=0&sort=asc&limit=100&afterDate={date}
07-25-2024 06:53
07-25-2024 06:53
Hi @smashrun
First, please don't post access tokens in the public community forums. If we need the token from you, we have a secure method for requesting it. Would you please edit your post and remove the token. I'm not able to do it.
It looks like you have a typo in your API call. The link to the documentation is https://dev.fitbit.com/build/reference/web-api/activity/get-activity-log-list/. There should be a ? between json and offset. So, the syntax would look like
https://api.fitbit.com/1/user/-/activities/list.json?offset=0&sort=asc&limit=100&afterDate={date}
07-25-2024 07:45
07-25-2024 07:45
Great. Thanks. Not sure how I didn't see that.That was a bug in some very old code (last commit 2021). It appears that one of your recent patches must have started rejecting these types of malformed requests.