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

Enable constructing GoogleServiceAccountClient with Credentials.from_service_account_info method #532

Open
attilatoth86 opened this issue Oct 3, 2023 · 1 comment
Assignees

Comments

@attilatoth86
Copy link

When initializing a GoogleServiceAccountClient, it expects Service Account JSON key file but there is no way to pass in the key file content as dictionary (e.g. after reading out from a secret store) because the constructor is limited to use the google.oauth2.service_account.Credentials.from_service_account_file()class method. Can this constructor be extended with .from_service_account_info() method, too?

https://google-auth.readthedocs.io/en/master/reference/google.oauth2.service_account.html#google.oauth2.service_account.Credentials.from_service_account_info

@christopherseeley
Copy link
Member

Thanks for the suggestion! In the meantime, you can use any google.oauth2 Credentials object with this library
https://github.com/googleads/googleads-python-lib/blob/main/googleads/oauth2.py#L215

@msaniscalchi msaniscalchi self-assigned this Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants