08-13-2019 23:20
08-13-2019 23:20
We are observing our participants data and seems for some data there is no data on API and this may happen for 2 or 3 continuous days and for sleep data as well,Is there any way to sync Fitbit automatically through our webAPI app after getting endpoint, last sync time timestamp?
Answered! Go to the Best Answer.
08-20-2019 10:21
08-20-2019 10:21
@shohrehgh24 You can extract historical data from user accounts via the web API as far back as January 2008. However, there is a limit to how much data the API calls can return in a single execution, so you may need to execute your calls multiple times while adjusting your date ranges.
In terms of data storage on the device, storage varies between the devices. Most Fitbit devices record detailed minute-by-minute data for 7 days. (Fitbit Alta records minute-by-minute data for five days). Fitbit devices can store daily totals for up to 30 days from the present day, meaning that it is a rolling 30 days. So if a device doesn't sync after 30 days, you'll begin to lose data one day at a time.
For more information, see "How do Fitbit devices sync their data?"
I hope this helps. Let me know if you have any other questions.
08-14-2019 13:34
08-14-2019 13:34
Hi @shohrehgh24,
Welcome to the forums!
It is possible that the user you are trying to extract data from is not actively syncing their device to the app. Once data has been synced to the account, that data will be available to be extracted through the Web API.
There isn't a way to force a device or a customer to sync their data. However, if you would like to be notified of when a user syncs their data or makes any changes to their account, you can use our Subscriptions API.
Because of the frequency of updates, Fitbit has developed the Subscriptions API that allows third-party applications to be notified when Fitbit user data changes. This allows apps to have a user's latest data without having to implement a polling or scheduling system to retrieve user's data.
I hope this helps! Let me know if you have any additional questions.
08-20-2019 06:01
08-20-2019 06:01
Thank you for your reply, as I understand Fitbit will keep data for 30days , does this 30days start from first day of month?
08-20-2019 10:21
08-20-2019 10:21
@shohrehgh24 You can extract historical data from user accounts via the web API as far back as January 2008. However, there is a limit to how much data the API calls can return in a single execution, so you may need to execute your calls multiple times while adjusting your date ranges.
In terms of data storage on the device, storage varies between the devices. Most Fitbit devices record detailed minute-by-minute data for 7 days. (Fitbit Alta records minute-by-minute data for five days). Fitbit devices can store daily totals for up to 30 days from the present day, meaning that it is a rolling 30 days. So if a device doesn't sync after 30 days, you'll begin to lose data one day at a time.
For more information, see "How do Fitbit devices sync their data?"
I hope this helps. Let me know if you have any other questions.
08-20-2019 17:45
08-20-2019 17:45
Thank you for your clarification.