【问题标题】:Error connecting Google AutoML API with API KEY将 Google AutoML API 与 API KEY 连接时出错
【发布时间】:2020-03-25 01:23:59
【问题描述】:

我正在尝试使用 Postman 提供的以下链接在 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】:

    只有有限数量的 Google API 可以通过 API 密钥使用,请参阅 here。 我认为 AutoML API 不支持基于密钥的访问。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-24
      • 1970-01-01
      • 2016-04-09
      • 2022-11-30
      • 2012-03-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多