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

404 Errors from Web API

ANSWERED

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?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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}

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

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

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}

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

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.

Best Answer
0 Votes