08-23-2016 14:27
08-23-2016 14:27
Hi All,
I'm new to Fitbit and building an application which pulls the data from Fitbit Server for Steps and Heart Rate Zone for many users using access token (Registered and Authenticated users from Fitbit account).
Steps API is wokring fine.
But Heart Rate API is returning the response without minutes details.
My Application settings : tried client and personal configuration
scopes are : settings+activity+heartrate+profile
Device i'm using : Fitbit Charge
Hear Rate API URL (tried intraday also) and response :
https://api.fitbit.com/1/user/4TK4K3/activities/heart/date/today/1d.json
{"activities-heart":[{"dateTime":"2016-08-24","value":{"customHeartRateZones":[],"heartRateZones":[{"max":96,"min":30,"name":"Out of Range"},{"max":134,"min":96,"name":"Fat Burn"},{"max":163,"min":134,"name":"Cardio"},{"max":220,"min":163,"name":"Peak"}]}}],"activities-heart-intraday":{"dataset":[],"datasetInterval":1,"datasetType":"minute"}}
is there any configuration or something i'm missing ?
your promt response will be greatly appreciated.
Thanks in Advance.
Jitu
08-23-2016 15:07
08-23-2016 15:07
Intraday heart rate data is a restricted feature. See the documentation.
08-23-2016 15:19 - edited 08-23-2016 15:27
08-23-2016 15:19 - edited 08-23-2016 15:27
Hi Jeremiah,
Thanks for the quick response.
My main concern is to pull the
Heart Rate Time Series
data with minute details. As shown in the FItbit API Documentation.
Client Setting with scopes : settings+activity+heartrate+profile
URL : http://api.fitbit.com/1/user/4TK4K3/activities/date/2016-08-14.json
{"activities-heart":[{"dateTime":"2016-08-23","value":{"customHeartRateZones":[],"heartRateZones":[{"max":90,"min":30,"name":"Out of Range"},{"max":126,"min":90,"name":"Fat Burn"},{"max":153,"min":126,"name":"Cardio"},{"max":220,"min":153,"name":"Peak"}]}}]}
Thanks,
Jitu
08-23-2016 15:25
08-23-2016 15:25
Did you follow the instructions to obtain access to the intraday heart rate data? The intraday time series endpoint won't return second-level or minute-level data unless you have a "personal" app type or are approved to access it.
08-23-2016 15:33 - edited 08-23-2016 15:36
08-23-2016 15:33 - edited 08-23-2016 15:36
Yes i follwed all the instruction (Registered the App in Fitbit and approved) to pull the data from Fitbit API.
Do i need to configure my App in personal settings to pull the Heart Rate Time Series data ?
https://dev.fitbit.com/docs/heart-rate/#heart-rate-time-series
i'm trying to pull the data at day level, not at minute or seconds level.
Thanks,
Jitu
08-23-2016 15:38
08-23-2016 15:38
Do you mean sum of minutes in each heart zone or what a person's heart was at a specific minute?
08-23-2016 15:40
08-23-2016 15:40
sum of minutes in each heart zone.
Thanks,
Jitu
08-23-2016 16:00
08-23-2016 16:00
Does this person have a Fitbit device with heart rate and have they synced recently?
I just tried a request to https://api.fitbit.com/1/user/-/activities/heart/date/today/1d.json with the same scopes you mentioned and it worked:
{ "activities-heart": [{ "dateTime": "2016-08-23", "value": { "customHeartRateZones": [], "heartRateZones": [{ "caloriesOut": 1178.3728, "max": 94, "min": 30, "minutes": 834, "name": "Out of Range" }, { "caloriesOut": 602.1936, "max": 131, "min": 94, "minutes": 117, "name": "Fat Burn" }, { "caloriesOut": 0, "max": 159, "min": 131, "minutes": 0, "name": "Cardio" }, { "caloriesOut": 0, "max": 220, "min": 159, "minutes": 0, "name": "Peak" }], "restingHeartRate": 61 } }] }