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

Get Heart Rate Intraday Time Series

Hello Fitbit Community!

 

So, I'm building a personal project to track my weight loss journey, and may have found something unintentional.

 

I was trying to pull my heart rate back for a single day, in second intervals (knowing that it doesn't have to record this every second... but data is data.) and received data that wasn't what I was expecting.

 

GET 'https://api.fitbit.com/1/user/-/activities/heart/date/' + '2020-04-10' + '/1d/00:01.json'

The above returned a list of (public) activities.

 

That was when I noticed that I had mistyped the endpoint I was trying to hit, which is below.

'https://api.fitbit.com/1/user/-/activities/heart/date/' + '2020-04-10' + '/1d/1sec.json'

This endpoint did return the data I was expecting.

 

Should the previous request have failed for invalid resource?

Best Answer
0 Votes
1 REPLY 1

Hi @tormentz,

 

Thanks for reporting this.

 

This is actually a bug and a known issue. It appears that there are a few endpoints that will return the activities list instead of error code when there is a typo or bad syntax in the endpoint URL.

 

The only workaround at this time is to ensure that you are formatting your endpoint correctly.

 

I hope this helps. Let me know if you have any questions in the meantime.

Best Answer
0 Votes