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

Checking compatibility with service_account #4

Open
Freeno83 opened this issue Feb 11, 2021 · 3 comments
Open

Checking compatibility with service_account #4

Freeno83 opened this issue Feb 11, 2021 · 3 comments

Comments

@Freeno83
Copy link

I have a service account enabled for google drive and sheets. I'm using the example sketch "Adafruit oauth2 test.py" with scopes = ["drive", "spreadsheets"] and the following (I have listed the equivalent key name from the service account JSON file):

secrets["google_client_id"] = "client_id"
secrets["google_client_secret"] = "private_key_id"

When I tried to run in ESP32S2, I could only get "KeyError: 'device_code'" so I brought into desktop python using normal requests library. I added a print statement before line 110 in Adafruit_oauth2.py to see what the response was and it is consistently:

  • {'error': 'invalid_client', 'error_description': 'Invalid client type.'}

So I want to verify if adafruit_oauth2 is compatible with service accounts, and if it is, what should be used for "google_client_id" and "google_client_secret".

Thanks,

Nick

@brentru
Copy link
Member

brentru commented Feb 11, 2021

The {'error': 'invalid_client', 'error_description': 'Invalid client type.'} error means either the Client Id or Client secret are invalid.

@Freeno83
Copy link
Author

I would like to know if the adafruit oauth2 library has ever been tested with a service account. I know that the ID and Secret are valid because they work in jupyter using gspread and oauth2client.service_account libraries.

@brentru
Copy link
Member

brentru commented Feb 11, 2021

I haven't tested it with a service account

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