我正在尝试使用邮递员下面的链接来连接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。
只能通过API密钥使用有限数量的Google API,外观为here。我认为AutoML API不支持基于密钥的访问。
对于邮递员,您可以使用OAuth2 playground生成访问令牌,但是如果要开发集成,则可以使用服务帐户凭据:)