【问题标题】:Invalid push endpoint error during Google Pub/Sub subscription creation在 Google Pub/Sub 订阅创建期间出现无效推送端点错误
【发布时间】:2016-04-14 12:10:51
【问题描述】:

我浏览了 Google 网站上的所有 prereqs

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

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

  3. 已将域添加到我的 API 凭据的 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 返回“给定的推送端点无效(endpoint=https://example.org/push-handler)。参考@987654326 @了解更多信息。">

另外,我无法从 Google 的 Pub/Sub 开发者控制台创建订阅。当我尝试时,我收到“无法添加订阅”通知。我是这个主题和项目的完全所有者,具有读写权限。我可以毫无问题地添加拉取订阅。

关于为什么的任何想法?看来我不是only one 打这个。

【问题讨论】:

  • 如何验证您的请求?
  • 私钥。它在创建主题时有效,所以我知道对 Google 的身份验证工作正常。

标签: google-cloud-platform google-cloud-pubsub lets-encrypt


【解决方案1】:

想通了。我在域验证中包含了协议 (https://example.org),而不仅仅是 example.org。如果域验证工具提供了一些验证来防止这种情况发生,那就太好了。

https://console.developers.google.com/apis/credentials/domainverification

【讨论】:

  • 感谢您的更新。那么example.org 有效吗?还是你需要协议部分?
  • 谢谢!很抱歉让您感到沮丧。
  • 不喜欢这种域验证问题。
  • 对于推送,只有 https webhook url 有效。因此,请确保您在端点中提供 https:// url。
猜你喜欢
  • 1970-01-01
  • 2017-09-14
  • 2019-08-15
  • 2018-10-19
  • 2021-12-12
  • 2015-05-24
  • 2020-02-01
  • 1970-01-01
  • 2019-11-10
相关资源
最近更新 更多