How can I get the file "service_account.json" for Google Translate API?

Alan Nexus picture Alan Nexus · Sep 18, 2017 · Viewed 14.7k times · Source

I try to use the Google Translate API in my development, but i can´t find a way to obtain the "service_account.json" file.

The step on "Console Google Cloud Platform":

steps on Console

Please, I need the steps in detail, since what I get from Google do not serve me

Thanks!

Answer

HJED picture HJED · Sep 19, 2017
  1. Go to https://console.cloud.google.com/apis/credentials
  2. On the top left there is a blue "create credentials" button click it and select "service account key." (see below if its not there)
  3. Choose the service account you want, and select "JSON" as the key type.
  4. It should allow give you a json to download

If the blue button is not there:

You need to fill in all the required fields on the "OAuth Consent screen" tab on the page linked above, or create one if one doesn't exist.

You may also need to create a client-id if that still doesn't work (I can't remember sorry).

If "service account key" isn't an option

You need to create a service account.

Go to https://console.cloud.google.com/iam-admin/serviceaccounts/project and click "Create Service Account"