jrg94 / fitbit-backup

An experimental tool for backing up Fitbit data as a CSV
MIT License
1 stars 0 forks source link

Automated Generation of Access Codes No Longer Works #3

Open jrg94 opened 7 months ago

jrg94 commented 7 months ago

I am no longer able to automatically generate the access codes using selenium since moving my account to Google. Sign in is much more painful.

jrg94 commented 1 month ago

I assume there is an easy way to do this, but it seems that we have to have the user log in on their system to get their data. This is a bit of a pain given that I want to run this on my raspberry pi, and I don't want to have to log in to get the data. Anyway, here's the authorization documentation: https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/. I may look to see if anyone has a browserless solution.

jrg94 commented 1 month ago

Okay, it looks like I might just be able to classify the application as "personal" to bypass some of the messiness: https://dev.fitbit.com/build/reference/web-api/developer-guide/application-design/

jrg94 commented 1 month ago

Nevermind! Seems like web authentication is just part of the process. I suppose I will need to request separate keys on each machine, so I don't run into the issue where I expend my refresh token on one of the machines. At least that's an issue described here: https://medium.com/digital-biomarker-discovery/a-guide-to-continuously-querying-user-data-via-the-fitbit-api-88fb25ffd7d5

jrg94 commented 1 month ago

Okay, I'm just dumb. Use the script included in the Fitbit Python docs: https://github.com/orcasgit/python-fitbit/blob/master/gather_keys_oauth2.py