02-23-2025 06:34
02-23-2025 06:34
Hi Fitbit community!
I’m looking for ways to extract the most detailed sleep data possible from my Fitbit Charge 6. I have a few questions and would really appreciate your insights:
GitHub integrations – Do you know of any GitHub projects that allow extracting highly detailed sleep data from Fitbit?
1.1. While we're at it – any general GitHub tools for Fitbit worth checking out?
Fitbit API details – I know the API provides a general sleep score and some sleep phase data, but:
Does it allow extracting exact timestamps for each sleep phase transition (e.g., second-by-second or minute-by-minute tracking of phase predictions)?
Or does the API only return broad sleep summaries, making it not worth the effort?
02-24-2025 10:09
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.
02-24-2025 10:09
Hi @goderz
1. We provide some sample code in the documentation that you could use to download sleep data. See https://dev.fitbit.com/build/reference/web-api/developer-guide/libraries-and-sample-code/. The sample code should get you started. If the code doesn't contain the sleep endpoints, then you should be able to use it as a guideline when adding the Get Sleep Log by Date endpoint. See https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date/
I'm not aware of any Github tools. Our support team uses 2 tools to reproduce questions from the developer community.
2. The Fitbit Web API doesn't provide the sleep score. It provides a sleep efficiency values which is calculated differently.
Best Answer