generative-ai-python icon indicating copy to clipboard operation
generative-ai-python copied to clipboard

ADC setup - Error 400: invalid_scope

Open abitrolly opened this issue 1 year ago • 2 comments

Description of the bug:

Login with ADC fails.

gcloud auth application-default login --scopes="https://www.googleapis.com/auth/generative-language,https://www.googleapis.com/auth/cloud-platform"

What I did wrong?

Actual vs expected behavior:

image

Any other information you'd like to share?

No response

abitrolly avatar Apr 22 '24 04:04 abitrolly

@abitrolly, I don't see client-id-file argument in gcloud auth application-default login command. Please follow Authentication with OAuth quickstart and let us know if you face any issues. Thank you!

singhniraj08 avatar Apr 24 '24 04:04 singhniraj08

@singhniraj08 why there should be the argument? Please explain. Without --scopes parameter the auth command successfully lands at https://cloud.google.com/sdk/auth_success

--scopes parameter was advised in https://github.com/google-gemini/generative-ai-python/issues/8

abitrolly avatar Apr 24 '24 15:04 abitrolly