我已经无限制地生成了Google Cloud API密钥。我将它传递给我的topic:publish
url作为查询参数,但我遇到了授权错误。
{
"error": {
"code": 403,
"message": "User not authorized to perform this action.",
"status": "PERMISSION_DENIED"
}
}
我不确定如何诊断权限问题,因为对密钥似乎没有任何限制。该主题的所有者是我的帐户,所以不应该是那里的问题。
Google Pub / Sub不支持API密钥进行授权。发布/订阅使用访问令牌。这意味着使用服务帐户或Google OAuth。