10-07-2020 01:44
10-07-2020 01:44
Hello,
I'm trying to get some activities with the following request:
URL | https://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
Answered! Go to the Best Answer.
10-07-2020 07:14
10-07-2020 07:14
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.
10-07-2020 07:14
10-07-2020 07:14
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.
10-07-2020 07:21
10-07-2020 07:21
Thank you so much. It worked
10-07-2020 07:26
10-07-2020 07:26
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?