问题
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!
回答1:
- Go to https://console.cloud.google.com/apis/credentials
- On the top left there is a blue "create credentials" button click it and select "service account key." (see below if its not there)
- Choose the service account you want, and select "JSON" as the key type.
- 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"
来源:https://stackoverflow.com/questions/46287267/how-can-i-get-the-file-service-account-json-for-google-translate-api