Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 :

enter image description here

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

like image 493
Alan Nexus Avatar asked Sep 18 '17 19:09

Alan Nexus


People also ask

How do I download JSON files from Google API?

Go to Google API Console. Go to the Credentials page. Click the Download JSON button to download the client secret JSON file and securely store it in a local folder. This JSON file can then be used by Google Drive components and metadata wizard to access Google Drive via the OAuth method Installed Application (JSON) .

How do I download Google API Key as JSON?

Click the Keys tab. Click the Add key drop-down menu, then select Create new key. Select JSON as the Key type and click Create.

How do I download service account key JSON?

Select the newly created service account and click on the 'KEYS' tab. Click the 'ADD KEY' dropdown, select 'Create New Key' and select JSON as the key type. The service account key JSON file is automatically downloaded to your local machine.


2 Answers

  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"

like image 78
HJED Avatar answered Sep 20 '22 14:09

HJED


the newest way to get credential.js is click to 'your_email_servicer'-> chose tab key then click [add Key]

enter image description here

like image 27
Thế Thái Avatar answered Sep 22 '22 14:09

Thế Thái