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

API return 500

ANSWERED

Hello,

I'm trying to get some activities with the following request:

URLhttps://api.fitbit.com/1/user/{my id}/activities/list.js?beforeDate=2019-05-10&sort=desc&offset=0&limit=20

But I get a 500 error all the time. Is there anything wrong in the request?

 

This one works well:

@GET("1/user/{user}/activities/date/{date}.json")

So I think I'm setting the correct token

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @Brown86.. Your request URL is incorrect.  It needs to be 

https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=2019-05-10&sort=desc&offset=0&limit=20

Note list.json.  I have also used - instead of the userId, but that will not affect the response status.

 

If you have any other questions around API issues like this, the Web API community will be a better place to get those answered. 

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Hi @Brown86.. Your request URL is incorrect.  It needs to be 

https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=2019-05-10&sort=desc&offset=0&limit=20

Note list.json.  I have also used - instead of the userId, but that will not affect the response status.

 

If you have any other questions around API issues like this, the Web API community will be a better place to get those answered. 

Best Answer
0 Votes

Thank you so much. It worked

Best Answer
0 Votes

I see this API is working also with limit=40 despite the doc saying:

"limit     The max of the number of entries returned (maximum: 20). Required."

Is there any possibility the API was improved and the doc needs to be updated?

Best Answer
0 Votes