I am learning Google Cloud Pub/Sub and following this official document : Writing and Responding to Pub/Sub Messages - Python

我正在学习Google Cloud Pub / Sub并遵循以下官方文档:编写和响应发布/订阅消息 - Python

When I deploy it to cloud, and try to submit the message, I get the following error :

当我将其部署到云,并尝试提交邮件时,我收到以下错误:

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.

发生内部错误:403用户未被授权执行此操作。 (POST https://pubsub.googleapis.com/v1/projects/your-project-id/topics/your-topic:publish)查看完整堆栈跟踪的日志。

I guess it's due to some authentication problem? Any help would be appreciated.

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

2 个解决方案

#1


5

Make sure that the client you are using is authorized to publish to Pub/Sub. See details here. If your client belongs to the same project as the topic, typically it won't require additional access control configuration. Make sure that your client is authenticated properly.

确保您使用的客户端有权发布到Pub / Sub。详情请见此处。如果您的客户端属于与主题相同的项目,则通常不需要其他访问控制配置。确保您的客户端已正确验证。

更多相关文章

  1. 当我运行createsuperuser获取HTTP 401错误
  2. 错误:在windows7中安装psycopg2时无法找到vcvarsall.bat
  3. dev-server HTTP错误403:禁止
  4. Django -表单无效但没有错误
  5. 套接字。接受错误24:对许多打开的文件
  6. Python之错误异常和文件处理
  7. django模板引擎有错误检查?
  8. 套接字错误“IP地址在其上下文中无效” - Python
  9. 无法安装ndg-httpsclient或者我的解决方案错误

随机推荐

  1. php中的array_shift函数怎么用
  2. php中的substr_replace函数怎么用
  3. php中的array_merge函数怎么用
  4. php中的substr_count函数怎么用
  5. php中的chunk_split函数怎么用
  6. php中的strnatcasecmp函数怎么用
  7. php中的strnatcmp函数怎么用
  8. php rtrim函数怎么用
  9. php strrev怎么用
  10. php中的str_ireplace函数怎么用