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

Empty array despite 200 OK code

ANSWERED

Capture - Copy.PNG

I got the correct OAuth2.0 access token and everything, but when I sent an API request it returned an empty array like this. I tried it with other data and it returned the same empty array as well. Does anyone know what the issue is?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I understood why it didn't work, its really silly. I copy pasted the Fitbit's API Curl example and the year was 2021 instead of 2022. 😭😭😭😭😭😭😭😭😭😭

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

Hi @abc123455555 

 

There are several conditions that are required for the Fitbit device to collect HRV data.  We explain this in the documentation.  See https://dev.fitbit.com/build/reference/web-api/heartrate-variability/get-hrv-summary-by-date/#Collec....   I would start by asking if the user has HRV data displaying in their Fitbit account?    If they do, then you should be able to get through the Web API.

 

Gordon

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

I get what you meant, but the problem is not for only HRV, but for every other thing as well. Their was HRV and other data on their account. The only thing that worked for me is the profile.json request, and for everything else it was just blank arrays

Best Answer
0 Votes

I understood why it didn't work, its really silly. I copy pasted the Fitbit's API Curl example and the year was 2021 instead of 2022. 😭😭😭😭😭😭😭😭😭😭

Best Answer
0 Votes

If the user has the data in their Fitbit account, then it should be available through the Web API.   Check the documentation for each of the endpoints where you are not receiving data.   For the new data points we released this year (SpO2, HRV, BR, VO2 Max and Temperature), we have documented how the data is collected by the device.  You can also verify the user ID that consented to your application is the same where the user sees the data by following these instructions: https://dev.fitbit.com/build/reference/web-api/troubleshooting-guide/common-solutions/#Data-Synchoni...

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