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
0 Votes
2 REPLIES 2

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