04-22-2022 08:44
04-22-2022 08:44
Good afternoon,
I am wanting to link my Fitbit in a way where every hour or two my sleep data is transferred to a google document. I saw a tutorial on linking it using an API and getting a Fitbit access token in order to do so, however, I haven't been successful in the process. Does anyone know a feasible way to do this?
Reasoning: I am doing research and have a script that can pull the data from the google document and then put it into our database, where our reasoning engine is determining if the user has slept enough hours to achieve a 'decent' sleep and if not, then the reasoning engine cross references with the users calendar and if no appointments or meetings exist then the users alarm can be pushed back. Granted this does mean that the users calendar and whatever alarm they use is linked to the smart-home environment.
05-05-2022 14:45
05-05-2022 14:45
Hello @cwmiles I've moved your post out of hardware support and into API support.
05-06-2022 08:42
05-06-2022 08:42
Hi @cwmiles
You can use the Web API to do this. Fitbit doesn't offer sample code but I have seen some through internet searches. If you are not program-savvy, I found where IFTTT has a solution (https://ifttt.com/connect/fitbit/google_sheets) you can try. If you're program-savvy, check out blog https://www.joe0.com/2020/08/02/how-to-sync-fitbit-data-to-google-spreadsheet-vs-2-aug-2020/. This is the most recent code sample I've seen, but I believe some of the google code might have been deprecated. If someone in the developer community has a more recent code sample, please share.
Gordon