电报 webhook:ssl 是强制性的吗?

Telegram webhook: Is ssl mandatory?

我想知道 SSL 证书和以 https:// 开头的 URL 是否对于 Telegram 机器人的 webhook 是必需的? 正如它在 https://core.telegram.org/bots/api#setwebhook 中注意到的那样,这似乎是必要的,但我对此不确定。

正如 Telegram Bot documentation 所说:

对 Telegram Bot API 的所有查询都必须通过 HTTPS 提供,并且需要以这种形式呈现。

  • You need a valid SSL certificate for webhooks to work.
  • To use a self-signed certificate, you need to upload your public key certificate - using the certificate parameter in setWebhook. Please upload as InputFile, - sending a String will not work.
  • Ports currently supported for Webhooks: 443, 80, 88, 8443.
  • Wildcard certificates may not be supported.
  • Redirects are not supported.
  • CN must exactly match your domain.

设置 SSL 并不难,而且也有完全免费的方法(例如免费有效的 SSL 证书或自签名方法)