11-01-2023 19:01
11-01-2023 19:01
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.
{I checked sleep data on fitbit dashboard.
"sleep": [],
"summary": {
"totalMinutesAsleep": 0,
"totalSleepRecords": 0,
"totalTimeInBed": 0
}
}
Answered! Go to the Best Answer.
11-02-2023 06:23
11-02-2023 06:23
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
11-02-2023 06:23
11-02-2023 06:23
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