4

我已经浏览了Google网站上的所有prereqs创建Google Pub/Sub订阅期间无效的推送端点错误

  1. 在服务器上获得并安装了SSL证书(来自Let's Encrypt)。

  2. 在Google Search Console上注册并验证了网域(是的,https网址)(例如https://example.org)。

  3. 添加到我的API Credential的域名Domain Verification

topic='projects/myproject/subscriptions/mytopic'

sub='projecs/myproject/subscription/mysub'

client.projects().topics().create(topic=topic, body={}).execute()

client.projects().subscriptions().create(name=sub, body={'topic': topic, 'pushConfig': {'pushEndpoint': ' https://example.org/push-handler '}})

我回来:

googleapiclient.errors.HttpError: https://pubsub.googleapis.com/v1/projects/myproject/subscriptions/mysub?alt=json returned "Invalid push endpoint given (endpoint= https://example.org/push-handler). Refer to https://cloud.google.com/pubsub/subscriber#create for more information.">

而且,我无法创建谷歌的发布/订阅开发者控制台订阅。当我尝试时,我收到“订阅无法添加”通知。我是这个主题和项目的完整所有者,拥有读写权限。我能够添加没有问题的订阅。

任何想法为什么?看起来我并不是only one

+0

您如何验证您的请求? –

+0

私钥。它在创建主题时起作用,所以我知道Google的身份验证工作正常。 – ehfeng

回答