-
Notifications
You must be signed in to change notification settings - Fork 34
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
How to use auth_google.py on Rpi without browser #13
Comments
No, I used vncserver just one time to do this. Am 03.08.2016 22:36 schrieb "keptenkurk" notifications@github.com:
|
Got it! Finaly googled my way through it. Here's the recipe: Phase 1. Create a project in Google Developers Console and enable the fitness API. Phase 2. Using your editor create a URL like: Phase 3. It is not the Authentication code we need, it's the json with access_token and refresh_token (especially the refresh_token which does not age) When using curl this needs to be crafted into a single string like: Google will respond with the json file which then can be saved a copied to your Pi. (ps: don't bother trying this data, it's all fake) EDIT: The generated json appears to be useless. It should contain many more parameters "_module" being one of them. |
Hmmm... my json appears to have an invalid structure as it halts: This is what my authentication json looks like: Would that be the correct structure? |
looks the same in mine. I will create a new pull request, as I have refactored a bit more code. |
That's odd... the KeyError message seems to hint that the json should contain some '_module' key in it? |
sorry to hear. I have been updateing my weight twice a day for a week now without fail. Hope you find out what the reason is. Maybe some missing dependency? The Fitbit code I used as inspiration had these: |
Finally was able to generate a working google.json. So to me this is a usable work around to the question posted. |
In order to generate the token auth_google.py needs to be run by
python auth_google.py [GOOGLE CLIENT ID] [GOOGLE CLIENT SECRET] https://www.googleapis.com/auth/fitness.body.write
is it possible to perform this step on a Rpi without browser?
The text was updated successfully, but these errors were encountered: