1

I want to use Google Translation V3 with C# client lib google provides. but what I can find all is using service account to authenticate.

I prefer to use API key as an authentication method instead of service account since I'll build this app to user's mobile and I don't want user to have my service account file.

but In google's official document I can only find the example to authenticated by service account.

so how can I use API key with C# lib to authenticated and use Google Cloud Translation?

CloudL
  • 201
  • 1
  • 5
  • 16

1 Answers1

4

You cannot use an API Key.

You will need to design a service that authorizes your users and your service will make translation requests on their behalf using a service account. You could also issue short-lived access tokens using your service account and then the client can make API requests using that access token.

Note: API Keys are now legacy and most Google Cloud services no longer support API Keys.

John Hanley
  • 74,467
  • 6
  • 95
  • 159
  • That will be a too large scale feature for me...but thanks, I really can't use an API key in google cloud V3. I use V2 instead and it works. Of course, it sacrifices some advanced feature of V3 translate(glossary, batch...etc) – CloudL Jan 22 '21 at 07:47