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

An empty sleep log is responsed

ANSWERED

I am using the following endpoint to obtain sleep logs.

https://api.fitbit.com/1.2/user/{user-id}/sleep/date/20231031.json

 but, a response of this request is empty response.

{

    "sleep": [],

    "summary": {

        "totalMinutesAsleep": 0,

        "totalSleepRecords": 0,

        "totalTimeInBed": 0

    }

}
I checked sleep data on fitbit dashboard.
sleep data is exists.
why can't I get my sleep data from endpoint request?
sleep_log.png
 
Sleep data for this account could be obtained with this endpoint until October 12, 2023.
All requests made after this date will result in empty sleep data.
Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @ogawa-satoru 

The reason a response is not being returned is due to the date syntax being specified.   See https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date/#Request.

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Hi @ogawa-satoru 

The reason a response is not being returned is due to the date syntax being specified.   See https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date/#Request.

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes