I am using the following endpoint to obtain sleep logs.
https://api.fitbit.com/1.2/user/{user-id}/sleep/date/20231031.jsonbut, 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.
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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
Best Answer