12-05-2017 05:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-05-2017 05:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
we are trying to read fitbit activity data for authorised user, using FITBIT WEB API, IMPLICIT FLOW WITH Client Authorisation for this we are using.
1. Activity data and summary
https://api.fitbit.com/1/user/-/activities/date/2017-10-27.json
{
"activities": [],
"goals": {
"activeMinutes": 30,
"caloriesOut": 2717,
"distance": 5.05,
"floors": 10,
"steps": 6000
},
"summary": {
"activeScore": -1,
"activityCalories": 811,
"calorieEstimationMu": 2100,
"caloriesBMR": 1643,
"caloriesOut": 2349,
"caloriesOutUnestimated": 2349,
"distances": [{
"activity": "total",
"distance": 5.47
}, {
"activity": "tracker",
"distance": 5.47
}, {
"activity": "loggedActivities",
"distance": 0
}, {
"activity": "veryActive",
"distance": 0.06
}, {
"activity": "moderatelyActive",
"distance": 0.87
}, {
"activity": "lightlyActive",
"distance": 4.53
}, {
"activity": "sedentaryActive",
"distance": 0
}],
"elevation": 18.29,
"fairlyActiveMinutes": 15,
"floors": 6,
"heartRateZones": [{
"caloriesOut": 74.1715,
"max": 93,
"min": 30,
"minutes": 62,
"name": "Out of Range"
}, {
"caloriesOut": 1426.375,
"max": 130,
"min": 93,
"minutes": 645,
"name": "Fat Burn"
}, {
"caloriesOut": 13.46498,
"max": 158,
"min": 130,
"minutes": 2,
"name": "Cardio"
}, {
"caloriesOut": 0,
"max": 220,
"min": 158,
"minutes": 0,
"name": "Peak"
}],
"lightlyActiveMinutes": 168,
"marginalCalories": 438,
"restingHeartRate": 95,
"sedentaryMinutes": 1256,
"steps": 7618,
"useEstimation": true,
"veryActiveMinutes": 1
}
}
Here: "activities": [] is always empty where as the fitbit doc says it must have the list of activities recorded.
2. Activity Log
https://api.fitbit.com/1/user/-/activities/list.json?afterDate=2017-10-27&sort=asc&offset=0&limit=20
in this api we are not getting distance information for activity with "auto-detect" key values.
Kindly provide solution for the same as we need to read the summary and activity details of user who authorize fitbit implicit flow.
Regards,
Answered! Go to the Best Answer.

Accepted Solutions
01-15-2018 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-15-2018 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You will need to use the Activity Timeseries API documented here - https://dev.fitbit.com/build/reference/web-api/activity/#activity-time-series but also need intraday data access. See the "Get Activity Intraday Time Series" section for details about getting access to intraday data.
01-03-2018 03:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-03-2018 13:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-03-2018 13:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Sorry for the confusion, but the term "Activity" here has a specific meaning and is different from general user "activeness" throughout the day (which is represented in the summary section).
An "activity" (one that will show up in the "activities": array response value) represents a recorded activity such as a workout or a run that was either started/stopped manually or automatically detected and logged. Normal actions, such as walking that aren't explicitly marked by the user as a named activity (ie yoga, running, weightlifting) will not show up as an activity in this API.
Please let me know if I misunderstood your question or you have further questions.
Thanks,
Chris

01-15-2018 02:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-15-2018 02:14
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you @ChrisMFitbit for your reply,
So let me just make sure I understand: If we want to know the user's number of steps per hour, we should use another API for that or does this resolution is simply not provided?
thanks,
Lior

01-15-2018 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-15-2018 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You will need to use the Activity Timeseries API documented here - https://dev.fitbit.com/build/reference/web-api/activity/#activity-time-series but also need intraday data access. See the "Get Activity Intraday Time Series" section for details about getting access to intraday data.
