06-09-2017 08:54 - edited 06-14-2017 13:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-09-2017 08:54 - edited 06-14-2017 13:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am trying to retrieve user's Intraday heart rate data. I have already requested and been granted access by Fitbit. My problem is no matter what I specify as the date, Fitbit API response only contains today's data. I have tried two versions of the API call listed on this page(https://dev.fitbit.com/docs/heart-rate/#get-heart-rate-intraday-time-series)
https://api.fitbit.com/1/user/-/activities/heart/date/2017-06-01/1d/1min.json
https://api.fitbit.com/1/user/-/activities/heart/date/2017-06-01/2017-06-01/1min.json
Both returns data with time stamp of current day. For example, even though I specified 2017-06-01 as the data in the API call, today is 2017-06-09, the API call would return data with time stamp 2017-06-09.
I am using this library: https://github.com/aarondcoleman/Fitbit.NET with C#. Other API calls such as sleep and intraday steps returns the correct data, but not the intraday heart series. What is wrong?
Edit: the data would change depending on the date I specify in the call, so I assume the heart rate data returned is the correct day. However the time stamp is still incorrect, how can i correct that?
Edit 2: My problem was the [activities-Heart-intraday] body only contained time value but not the date. When C# parsed it, it defaults to the current day's date. The date value is included in the [activities-Heart] json body.
Answered! Go to the Best Answer.
Accepted Solutions
06-12-2017 17:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-12-2017 17:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The problem is probably within Fitbit.NET. Since you know the date you requested, and you know the correct heart-rate data is being returned, you can probably ignore or work around the problem.
Gondwana Software
06-12-2017 17:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-12-2017 17:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@BillyBobJoe The endpoints seem to be working as they should, and returns the correct data: Fitbit Explorer

06-12-2017 17:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-12-2017 17:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The problem is probably within Fitbit.NET. Since you know the date you requested, and you know the correct heart-rate data is being returned, you can probably ignore or work around the problem.
Gondwana Software
06-12-2017 17:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-12-2017 17:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I was thinking the same thing, thanks @Gondwana

06-14-2017 13:29 - edited 06-14-2017 13:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-14-2017 13:29 - edited 06-14-2017 13:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thanks for the reply, the problem is indeed happening on the .Net side. Intraday Heart Rate Json has two components: [Activities-Heart], which contains the date and [Activities-Heart-Intraday], which contains the data value and the interval marker (i.e. 00:01:00, 00:02:00 for minute detail level). The problem is that I only serialized the [Activities-Heart-Intraday] component and parsed the minute string to dateTime. C# automatically assume the date to be current day since the string only contains the time value.
