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

FITBIT web api for activities return empty array for activities

 Hi Community,

 

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,

Team PHRMS. 

Best Answer
1 REPLY 1

was there any solution to this?

Best Answer
0 Votes