Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyway for setting Telegram Webhook without setting up https connection

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

like image 464
ahmet Avatar asked May 25 '16 23:05

ahmet


1 Answers

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. enter image description here

All steps you need (in PC):

1- Download ngrok.exe

2- Run in command line : "ngrok http 8888"

3- It is ready Now!

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) enter image description here

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:

enter image description here

like image 116
Seyfi Avatar answered Sep 17 '22 11:09

Seyfi