Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google api 发布子授权问题_Google Api_Google Cloud Platform_Google Authentication - Fatal编程技术网

Google api 发布子授权问题

Google api 发布子授权问题,google-api,google-cloud-platform,google-authentication,Google Api,Google Cloud Platform,Google Authentication,我已经生成了一个谷歌云API密钥,没有任何限制。我正在将其作为查询参数传递给my topic:publish url,但遇到了授权错误 { "error": { "code": 403, "message": "User not authorized to perform this action.", "status": "PERMISSION_DENIED" } } 我不确定如何诊断权限问题,因为密钥似乎没有任何限制。该主题的所

我已经生成了一个谷歌云API密钥,没有任何限制。我正在将其作为查询参数传递给my topic:publish url,但遇到了授权错误

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

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

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

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

aaah,这很有意义。谢谢你!啊,这是有道理的。谢谢你!