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

Heart rate zones minutes different on Fitbit app and API

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, 

Fitbit-API_20211213.PNGApp-Fitbtit_20211213.jpg
Kind regards,

Best Answer
6 REPLIES 6

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

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit !

 

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 !

Best Answer
0 Votes

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

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit 

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,

 

Best Answer
0 Votes

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

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit

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

Best Answer
0 Votes