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

Specifics of sleep web API call

ANSWERED

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

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@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.

View best answer in original post

Best Answer
2 REPLIES 2

@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.

Best Answer

I thought so. Thank you!

Best Answer
0 Votes