gpt4 book ai didi

python - 尝试推送通知时的 Cloud Pub/Sub Demo : 403 User not authorized to perform this action.

转载 作者:太空狗 更新时间:2023-10-29 20:43:21 25 4
gpt4 key购买 nike

我正在学习 Google Cloud Pub/Sub 并遵循此官方文档:Writing and Responding to Pub/Sub Messages - Python

当我将它部署到云端并尝试提交消息时, enter image description here我收到以下错误:

An internal error occurred: 403 User not authorized to perform this action. (POST https://pubsub.googleapis.com/v1/projects/your-project-id/topics/your-topic:publish) See logs for full stacktrace.

我猜这是由于某些身份验证问题?任何帮助将不胜感激。

最佳答案

确保您使用的客户端已获得发布到 Pub/Sub 的授权。参见 details here .如果您的客户端与主题属于同一项目,通常不需要额外的访问控制配置。确保您的客户是 authenticated properly .

关于python - 尝试推送通知时的 Cloud Pub/Sub Demo : 403 User not authorized to perform this action.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37623509/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com