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

Fitbit API return Heart Rate data without Minutes

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

 

 

Best Answer
0 Votes
7 REPLIES 7

Intraday heart rate data is a restricted feature. See the documentation.

Best Answer
0 Votes

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

 

 

 

Best Answer
0 Votes

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.

Best Answer
0 Votes

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

 

 

Best Answer
0 Votes

Do you mean sum of minutes in each heart zone or what a person's heart was at a specific minute?

Best Answer
0 Votes

sum of minutes in each heart zone.

 

Thanks,

Jitu

Best Answer
0 Votes

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
		}
	}]
}
Best Answer
0 Votes