Pubsub授权问题

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

我已经无限制地生成了Google Cloud API密钥。我将它传递给我的topic:publish url作为查询参数,但我遇到了授权错误。

{
    "error": {
        "code": 403,
        "message": "User not authorized to perform this action.",
        "status": "PERMISSION_DENIED"
    }
}

我不确定如何诊断权限问题,因为对密钥似乎没有任何限制。该主题的所有者是我的帐户,所以不应该是那里的问题。

google-api google-cloud-platform google-authentication
1个回答
4
投票

Google Pub / Sub不支持API密钥进行授权。发布/订阅使用访问令牌。这意味着使用服务帐户或Google OAuth。

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