简体   繁体   English

找不到 Google Cloud Vision API

[英]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.我正在尝试获取 Google Cloud Vision 的 API 密钥。 However, when I go to create an API key, that is not shown (only OAuth and serviced accounts are available).但是,当我 go 创建一个 API 密钥时,它没有显示(只有 OAuth 和服务帐户可用)。

How can you go around it?你怎么能绕go呢?

在此处输入图像描述

Click the link "Credentials in APIs & Services" to create API Keys.单击链接“API 和服务中的凭据”以创建 API 密钥。

You'll need to choose the correct project but the link should be:您需要选择正确的项目,但链接应该是:

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

API Keys are Project not API specific; API 密钥是项目而不是API具体的; 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.但是,一旦您创建了特定于项目的 API 密钥,您就可以编辑并添加 API 限制,并且您可以在那里使用 select Vision API。

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. API 密钥是不记名令牌,就其性质而言,通常是分布式的。 Anyone that holds the API Key (token) can access the project resources that its use confers.持有 API 密钥(令牌)的任何人都可以访问其使用赋予的项目资源。

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您可以使用 Google Cloud 控制台 API 密钥对 Vision API 进行身份验证。按照说明进行操作Vision API -> 使用 API 密钥创建 API 密钥

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:然后你需要指定服务帐户名称和ID,你可以添加描述如:

在此处输入图像描述

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.然后我点击完成,它为我创建了一个服务账户,然后你需要点击服务账户的 email。

在此处输入图像描述

There is an option menu on the top you click on Key, and then you click on ADD KEY .单击 Key 顶部有一个选项菜单,然后单击ADD KEY

在此处输入图像描述

Finally you have to choose the Key type that can be JSON or P12 .最后,您必须选择密钥类型,可以是JSONP12

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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