11-24-2016 15:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2016 15:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I have an app (configured as Personal) that successfully authenticates and retrieves summary data, but it fails when I attempt to get my activities list. The scopes I'm authorizing are:
string[] scopes = new string[] { "activity", "heartrate", "profile", "sleep", "weight" };
The URL I'm calling is:
https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=2016-11-24&sort=desc&limit=10
With the exception of the date value, this URL matches exactly to an example I found on this forum, but the response I get is 400 : Bad Request
Any suggestions on what I'm doing wrong?
Thanks,
Chris
Answered! Go to the Best Answer.
Accepted Solutions
11-26-2016 04:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-26-2016 04:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi,
check DOC - https://dev.fitbit.com/docs/activity/#get-activity-logs-list offset is required parameter
11-26-2016 04:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-26-2016 04:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi,
check DOC - https://dev.fitbit.com/docs/activity/#get-activity-logs-list offset is required parameter
11-28-2016 07:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-28-2016 07:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
My first attempt was with all the parameters, sorted the way they appear in the Docs. I got the 400 error so started playing with them. The Docs also state that offset is only required for now, when I saw the example I assumed that "now" had expired so tried the call without it.
After much trial and error I have found a call syntax that works, and am now happily parsing activity data.
https://api.fitbit.com/1/user/-/activities/list.json?afterDate=2016-11-26&sort=asc&limit=10&offset=0
I really wanted to use beforeDate and sort=desc, but such is life.Hope this helps someone else down the road.
Chris

11-29-2016 12:28 - edited 11-29-2016 12:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



11-29-2016 12:28 - edited 11-29-2016 12:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
CuriousChris wrote:After much trial and error I have found a call syntax that works, and am now happily parsing activity data.
https://api.fitbit.com/1/user/-/activities/list.json?afterDate=2016-11-26&sort=asc&limit=10&offset=0
I really wanted to use beforeDate and sort=desc, but such is life.
@CuriousChris You can, just change the parameters:
https://api.fitbit.com/1/user/-/activities/list.json?beforeDate=today&sort=desc&limit=10&offset=0

