将Google AutoML API与API密钥连接时出错

问题描述 投票:0回答:1

我正在尝试使用邮递员下面的链接来连接API

POST https://automl.googleapis.com/v1/projects/*****/locations/us-central1/models/*****:predict?key=*****

但是我收到以下消息:

{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED"
  }
}

KEY被授权使用API​​。

google-cloud-platform google-oauth google-cloud-vision google-vision google-cloud-automl
1个回答
0
投票

只能通过API密钥使用有限数量的Google API,外观为here。我认为AutoML API不支持基于密钥的访问。

对于邮递员,您可以使用OAuth2 playground生成访问令牌,但是如果要开发集成,则可以使用服务帐户凭据:)

© www.soinside.com 2019 - 2024. All rights reserved.