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

天大地大妈咪最大 提交于 2020-01-24 21:31:07

问题


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:


  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"



来源:https://stackoverflow.com/questions/46287267/how-can-i-get-the-file-service-account-json-for-google-translate-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!