-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Can not use 'my-api-key' on google.cloud.translate API. translate may support OAuth2 now? #2903
Comments
@hidehara I'm sorry you ran into trouble with this! Support for the API key was removed via #2823 and released in 0.22.0. The prefered way to authenticate is with service accounts. Which we do have docs explaining how to set that up here: https://googlecloudplatform.github.io/google-cloud-python/stable/google-cloud-auth.html. |
@daspecster Thanks for nice reply. I have a question , why API-Key was removed ? If you have any information, please let's me know. I read #2823 , so I understand that I should use OAuth2 from 0.22.0. |
Anytime! @hidehara, I believe that it was always intended that Translate use Service Accounts. @jonparrott or @dhermes would know more about it I'm sure. |
@daspecster , Oh, sorry about type of Account.
I confused to use which type of Account , cause of help(translate.Client). But now I'm OK to use Service Account. If Google will still support API-Key , It's easy & best way for me (; |
@hidehara We elected to drop support for API key auth as a "library decision" but the backend still supports it. The auth doc linked to by @daspecster should have everything needed to authenticate. It's incorrect to say you must use a service account, you can also use OAuth 2.0 based credentials for user accounts. For deployed applications however, we strongly recommend the use of a service account. The release listed the dropped feature, though maybe this wasn't clear enough? |
@dhermes Thanks for above. I'm clear now. I got background of "library decision" and the backend still supports API Key auth. |
I'm trying to use translate API with API-Key.
But I got error when I follow instruction on instruction of following:
Translate Doc mentioned how to use it:
Error:
I just guess , now only OAuth2 is supported by translate API. Because of some information. Should the Doc updates or am I wrong ?
Env:
Some information:
On Translate Client Document,
And help(translate.Client)
The text was updated successfully, but these errors were encountered: