I want to setup Telegram
Webhook
but I don’t have https
URL, I don’t want to deal with ssl certificates either.
Can I solve this problem by using https URL or without setting https
certificate up?
Telegram webhook desc: https://core.telegram.org/bots/api#setwebhook
4
Answers
You can’t without a proper certificate, but it’s now really easy to get one (and for free) : https://letsencrypt.org/getting-started/
You have two options to get updates from telegram:
You can take advantage of the Cloudflare Universal SSL to protect your endpoint with SSL. You don’t have to deal with anything.
https
is mandatory but it doesn’t mean you MUST set it up completely. You can use more more simple ways, let me explain:You can connect your localhost server on your own PC or mac or linux machine, to telegram severs without setting any SSL Certificates.
With using “ngrok.com Secure tunnels” you will have a https address that is mandatory for dealing with
webhooks
but no need to setup any SSL.All steps you need (in PC):
very simple,is not it
After running ngrok.exe it shows you somthing like: “https://abcd1234.ngrok.io”
This is your temporary https that you can use as webhook. It is valid and belong to your bot until you close
ngrok.exe
( I even standby my computer without closing app and it remains for me-excellent)Additionally with this app i have access to all messages that Telegram send to my bot and my bot api outputs (not include my sent message) as JSON show. You can access to these panel via
http://localhost.com:4040
. This is a sample: