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

the heart rate information is wrong

ANSWERED

I am using the fitbit web api to bring my data from the cell phone but it sends me wrong data and the restingHeartRate field no longer arrives as the documentation shows.

 

this is an example of the response returned by the api

 

{
  "activities-heart": [
    {
      "dateTime": "2021-08-03",
      "value": {
        "customHeartRateZones": [],
        "heartRateZones": [
          {
            "max": 97,
            "min": 30,
            "name": "Out of Range"
          },
          {
            "max": 135,
            "min": 97,
            "name": "Fat Burn"
          },
          {
            "max": 164,
            "min": 135,
            "name": "Cardio"
          },
          {
            "max": 220,
            "min": 164,
            "name": "Peak"
          }
        ]
      }
    }
  ],
  "activities-heart-intraday": {
    "dataset": [],
    "datasetInterval": 1,
    "datasetType": "minute"
  }
}

 

 
Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Thanks Gordon, I have two 2 users and I fetch data from user 1 and  the data I needed was from user 2.

 

Thanksss!!! 

View best answer in original post

Best Answer
2 REPLIES 2

Hi @darevalo08 

 

I believe you're querying the data from a different user.   You can use the following instructions to find your user ID in the mobile application: https://dev.fitbit.com/build/reference/web-api/troubleshooting-guide/common-solutions/#Fitbit-user-h....  To find the user ID for the access token in your application, call the Introspect endpoint and specify the access token as the value in the form parameter.  See https://dev.fitbit.com/build/reference/web-api/oauth2/#retrieve-state-of-tokens.    The 2 user ids should match.   If they don't, then you logged into your application with the wrong Fitbit account.

 

Gordon

 

Gordon

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

Thanks Gordon, I have two 2 users and I fetch data from user 1 and  the data I needed was from user 2.

 

Thanksss!!! 

Best Answer