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

Not able to fetch data through api

I have generated a valid token for my account and now when I use the api for fetching my watch data, it shows a generic data response for any date that I provide. could you please help if i am missing something

Best Answer
3 REPLIES 3

Hi @waqasK 

Thanks for reaching out.

To help me figure out why you are seeing generic data instead of your actual stats, could you please provide:

  1. The exact endpoint URL you are trying to call.

  2. A snippet of the JSON response you are currently receiving.

Once I see those, I can determine if this is a permission scope issue or a data sync delay. 

Best Answer

ok here is my entpoint url: 

https://api.fitbit.com/1/user/-/activities/heart/date/$formattedDate/1d.json

Here is the response I get for any date I pass:
Activities Heart Response : {activities-heart: [{dateTime: (date removed due to the error while posting here), value: {customHeartRateZones: [], heartRateZones: [{caloriesOut: 1253.97786, max: 113, min: 30, minutes: 1440, name: Out of Range}, {caloriesOut: 0.0, max: 140, min: 113, minutes: 0, name: Fat Burn}, {caloriesOut: 0.0, max: 173, min: 140, minutes: 0, name: Cardio}, {caloriesOut: 0.0, max: 220, min: 173, minutes: 0, name: Peak}], restingHeartRate: null}}]}

Note: I pass the user token in header as required otherwise the endpoint won't respond with data. thank you

 

Best Answer
0 Votes

Hi @waqasK 

Thank you for sharing the endpoint and the response snippet. The response indicates that while the API is functioning, there is no recorded heart rate data available on the server for that specific account and date.

Could you please check the following?

  • Have you been wearing the device, and do you see heart rate data currently visible in your Fitbit mobile app for those dates?

  • If the data is visible in the app, please double-check that the User ID in the mobile app settings matches the one you are querying in your endpoint.

If the data is visible in the app and the IDs match, let us know and we can dive deeper.

Best Answer
0 Votes