Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Fitbit Error 400 #12

Open
tombull89 opened this issue Sep 8, 2021 · 1 comment
Open

Issue with Fitbit Error 400 #12

tombull89 opened this issue Sep 8, 2021 · 1 comment

Comments

@tombull89
Copy link

Hi there, I'm in the process of setting up a test FitBit > Grafana, however, I've fallen at the final hurdle.

I've set up a "Authorization Code Flow" flow type, added all the details to the python script, but when I run it I get the following message.

python .\fitbit.py
Got devices from Fitbit
Got sleep sessions from Fitbit
Got steps from Fitbit
Got distance from Fitbit
HTTP request failed: 400 Client Error: Bad Request for url: https://api.fitbit.com/1/user/-/activities/floors/date/today/1d.json

If I run the CURL command from the tutorial it shows the results okay, it's just whenever I try to run the python script it fails. I'm not good with python or scripting so I'd appriciated any help.

Thanks,
Tom

@mammuth
Copy link
Contributor

mammuth commented Oct 22, 2022

Random assumption: You have a device that doesn't track elevation/floors (eg. Charge 5).

You could try removing these two from the script:
https://github.com/c99koder/personal-influxdb/blob/master/fitbit.py#L302-L303

(I didn't test whether such a device would actually raise a 400 like this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants