In any case, to configure Telegram Webgram without establishing an https connection

I want to configure Telegram Webhook , but I do not have https URLs, I also do not want to deal with ssl certificates.

Is it possible to solve this problem with the https url or without installing the https certificate?

Telegram webhook desc: https://core.telegram.org/bots/api#setwebhook

+6
source share
4 answers

https is required, but that does not mean that you MUST fully install it. You can use simpler methods, let me explain:

You can connect your local host server on your own computer or Mac or Linux machine to telegram the video without installing SSL certificates. Using "ngrok.com Secure Tunnels" , you will have an https address, which is required to work with webhooks , but you do not need to configure SSL, enter image description here

All necessary steps (on PC):

1- Download the ngrok.exe file

2- Run on the command line: "ngrok http 8888"

3- Done Now!

very simple, right?

After running ngrok.exe, it will show you something like: " https://abcd1234.ngrok.io " This is your temporary https that you can use as a webhook. It is valid and belongs to your bot until you close ngrok.exe (I even backup the computer without closing the application, and it remains fine for me) enter image description here

In addition, this application I have access to all messages that Telegram sends to my bot and my bot-api-outputs (not including my sent message), like a JSON show. You can access this panel through http://localhost.com:4040 . This is an example:

enter image description here

+9
source

You cannot without a proper certificate, but now it is very easy to get one (and free): https://letsencrypt.org/getting-started/

+3
source

You have two options for receiving updates from a telegram:

  • Webhook, this method only works with ssl (yes, I agree with Tom - let the encryption be awesome)
  • getUpdates, which works using a long poll, this method does not require ssl. Further information in the API documentation: https://core.telegram.org/bots/api#getupdates
+2
source

You can use Cloudflare Universal SSL to protect your endpoint with SSL. You do not need to decide anything.

+1
source

All Articles