Hello,
I am making an android app for a uni project and I need the heart rate details from fitbit.
Ideally I would need real/time heart rate data but I understand this is not possible (is this still the case?), so I'll need to work with the sync every 15-20min.
My question is, does the intraday data also sync every time the fitbit synchronises with the app, or is it only available once a day? Can I access the infraday data collected up to the moment when the last synchronization happened? And if so, how do I do it? (Should I write some specific information on the start-time and end-time fileds in the API request, or is just writing "today" in the date field enough?)
Thanks in advance for the help!
Community Moderator Alumni are previous members of the Moderation Team, which ensures conversations are friendly, factual, and on-topic. Moderators are here to answer questions, escalate bugs, and make sure your voice is heard by the larger Fitbit team. Learn more
Hey @SaraBat, the data is available as soon as it syncs.
SaraBat wrote:Can I access the infraday data collected up to the moment when the last synchronization happened? And if so, how do I do it?
If you're just referring to data for the current day, then yes, "today" will give you data up until last sync.
Example:
https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/15min.json
"activities-heart-intraday": {
"dataset": [
{
"time": "00:00:00",
"value": 65
},
{
"time": "00:15:00",
"value": 85
},
{
"time": "00:30:00",
"value": 91
},
{
[...]
},
{
"time": "09:30:00",
"value": 151
},
{
"time": "09:45:00",
"value": 114
}
],
"datasetInterval": 15,
"datasetType": "minute"
}
If no data was synced for "today", then "dataset" will be empty.
Best Answer