3
votes

I want to know if SSL certificate and URL starting with https:// is mandatory for webhook of a Telegram bot? As it noticed in https://core.telegram.org/bots/api#setwebhook it seems it is necessary, but I'm not sure about this.

1
Yes, it's absolutely necessary. You could use self-signed certificate. - ihoru
Why are you not sure if it is necessary? The documentation says it is, what makes you believe otherwise? - Johannes Kuhn
@JohannesKuhn I hoped that may be it works without SSL/HTTPS! - VSB

1 Answers

2
votes

As Telegram Bot documentation says:

All queries to the Telegram Bot API must be served over HTTPS and need to be presented in this form.

  • 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.

Setting up SSL is not hard and there or completely free ways too(like free valid SSL certs or self-sign methods)