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

Using refresh_token not refreshing? #33

Open
malanmurphy opened this issue Aug 5, 2023 · 0 comments
Open

Using refresh_token not refreshing? #33

malanmurphy opened this issue Aug 5, 2023 · 0 comments

Comments

@malanmurphy
Copy link

It looks like the refresh token support isn't working as expected. Once you get the exporter up and running with --credentials and --refresh-token, it scrapes Nest API endpoints as expected, but then stops working after two hours returning:

2023/08/05 09:47:24 unable to get devices: googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
More details:
Reason: authError, Message: Invalid Credentials

My understanding is that tools should use the refresh token to refresh access, but I'm no expert in OATH2 so maybe I'm missing something? I'm running the exporter with:

./smartdevicemanagement_exporter --listen-address :9788 --project-id <red_guid> --credentials ./client_secret.json --refresh-token ./refresh_token.json

Thanks!

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

1 participant