简体   繁体   中英

Cannot find Google Cloud Vision APIs

This question might be borderline for here.

I am trying to get the API key for Google Cloud Vision. However, when I go to create an API key, that is not shown (only OAuth and serviced accounts are available).

How can you go around it?

在此处输入图像描述

Click the link "Credentials in APIs & Services" to create API Keys.

You'll need to choose the correct project but the link should be:

https://console.cloud.google.com/apis/credentials

API Keys are Project not API specific; the name makes this confusing, admittedly.

However, once you create a Project-specific API key, you can edit and should add API restrictions and you can select the Vision API there.

I encourage you to add Application restrictions too.

CAUTION You want to make the restrictions as restrictive as you possibly can. API Keys are bearer tokens and, by their nature, are often distributed. Anyone that holds the API Key (token) can access the project resources that its use confers.

You can use a Google Cloud console API key to authenticate to the Vision API. Follow the instructions Vision API -> Using an API key and Creating an API key

You can create a Key following the next instructions:

First you need to create a Service account as:

在此处输入图像描述

Then you need to specify the Service account name and ID, and you can add a description such as:

在此处输入图像描述

You click create and continue then you need to add the roles to the service account that you need just to show you I added Editor role:

在此处输入图像描述

Then I clicked done, and it created me a Service account then you need to click on the email of the service account.

在此处输入图像描述

There is an option menu on the top you click on Key, and then you click on ADD KEY .

在此处输入图像描述

Finally you have to choose the Key type that can be JSON or P12 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM