根据https://cloud.google.com/resource-manager/docs/authorizing,可以使用API密钥授权请求.我无法让它发挥作用.
这是我的请求的样子:
curl -H "Content-Type: application/json" -X POST -d '{"key":"<Some Key>"}' https://cloudresourcemanager.googleapis.com/v1beta1/projects
Run Code Online (Sandbox Code Playgroud)
响应:
{
"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"
}
}
Run Code Online (Sandbox Code Playgroud)
任何帮助高度赞赏.
google-api ×1