12-17-2021 06:55
12-17-2021 06:55
Hi Fitbit community,
We are actually implementing the use of heart rate zone minutes on our app, and facing issues with the values sent through the API that are not consistent with values available in the app. For example on my account, here is what I have:
- Fitbit app: Fat burn zone: 6min / Cardio zone: 4min / Peak zone: 2min
- API: Fat burn zone: 153min / Cardio zone: 2min / Peak zone: 5minThanks for the help,
Kind regards,
12-20-2021 12:28
12-20-2021 12:28
Hi @pécé
I'm trying to see if I can reproduce this problem. Would you please verify the following information for me?
1. Please confirm the API endpoint being used to get the JSON response? I'd like to see the syntax of the API call.
2. The date is not displayed in the JSON output. Please confirm the response is for 2021-12-13.
3. Lastly, please confirm the user id in the access token being used with the API call is the same as the user in the Fitbit mobile app. The access token is a JWT token, so you should be able to use a tool to extract the user id. There are instructions for verifying the user id in the mobile app in this section of documentation: https://dev.fitbit.com/build/reference/web-api/troubleshooting-guide/common-solutions/#Fitbit-user-h....
Thanks!
Gordon
12-21-2021 00:10
12-21-2021 00:10
Hi @Gordon-C !
1. Used enpoint is https://api.fitbit.com/1/user/-/activities/date/2021-12-13.json
2. It's exactly for 2021-12-13
3. User id (sub field in the JWT token) is the same as the one got from Web API.
Thanks !
12-21-2021 10:56
12-21-2021 10:56
Thank you, @pécé
I think I found a scenario that replicates your problem. While I investigate more, would you please test the Get Heart Rate Time Series endpoint to see if the numbers match between the mobile application and your response?
Gordon
12-22-2021 00:08 - edited 12-22-2021 00:13
12-22-2021 00:08 - edited 12-22-2021 00:13
Hi @Gordon-C
Here is what I get for HeartRate TimeSeries API, for the same account, date=2021-12-13 and period=1d :
{
"activities-heart": [
{
"dateTime": "2021-12-13",
"value": {
"customHeartRateZones": [],
"heartRateZones": [
{
"caloriesOut": 1780.7237,
"max": 119,
"min": 30,
"minutes": 1428,
"name": "Out of Range"
},
{
"caloriesOut": 28.395500000000002,
"max": 143,
"min": 119,
"minutes": 6,
"name": "Fat Burn"
},
{
"caloriesOut": 28.954099999999997,
"max": 173,
"min": 143,
"minutes": 4,
"name": "Cardio"
},
{
"caloriesOut": 18.806199999999997,
"max": 220,
"min": 173,
"minutes": 2,
"name": "Peak"
}
],
"restingHeartRate": 72
}
}
]
}
This is indeed the same data we can see in the Fitbit mobile application (and it looks consistent with real user activity). I'm very interested to find out why DailySummary has such wrong data for heart rate and if it might be fixed !
Thanks in advance,
12-22-2021 09:27
12-22-2021 09:27
Thank you for confirming. I am going to create a support ticket for this problem and send you an email for reference. Please check your email in a few minutes.
Gordon
02-07-2022 11:38
02-07-2022 11:38
Hi @Gordon-C!
Would you please give us an update on this topic?
On our side heart rate zone minutes sent through the API are still inaccurate.
Kind regards,
Camille