02-22-2018 09:22
02-22-2018 09:22
Hello all,
Task: My research team would like to determine how long a user has slept 'so-far' if the user is still asleep.
Example: Assume the current user is sleeping when I make a sleep web API call, and the user has both 'Always Connected' and 'Keep-Alive Widget' turned on on their official fitbit app (so that all fitbit device (specifically Charge 2s) data can be sent to the official fitbit app as fast as allowed). Assume the current user fell asleep on 2018-02-21 at 10:00pm. If I make the sleep web API call to:
https://api.fitbit.com/1.2/user/-/sleep/date/2018-02-21/2018-02-23.json
for this user on 2018-02-22 at 6:55am, what gets returned?
Let me know if this is needs clarification. Any help/insight is appreciated. Thank you in advance.
- Justin
Answered! Go to the Best Answer.
02-22-2018 10:38 - edited 02-22-2018 12:56
02-22-2018 10:38 - edited 02-22-2018 12:56
@jugoodma Fitbit API does not currently allows to get information about sleep if user is currently sleeping.
Our system uses comprehensive algorithms that are calculated at our backends. The data about sleep is available after user has woken up and synced his devices but not during the time while user is sleeping.
02-22-2018 10:38 - edited 02-22-2018 12:56
02-22-2018 10:38 - edited 02-22-2018 12:56
@jugoodma Fitbit API does not currently allows to get information about sleep if user is currently sleeping.
Our system uses comprehensive algorithms that are calculated at our backends. The data about sleep is available after user has woken up and synced his devices but not during the time while user is sleeping.
02-22-2018 12:11
02-22-2018 12:11
I thought so. Thank you!