Closed jaehunjung1 closed 4 years ago
But to run the webhook, we need public ip address to which telegram server will send request. Since we do not have any domain yet, in order to run webhook in local, you need to follow below steps.
ngrok http 8000
.
This will give you temporary public address for our backend. api.telegram.org/bot1007785006:AAGZNrBr4w-Eovrf-ZQj7P7MSN6KS3Cl23g/setWebHook?url=https://SOMETHING.ngrok.io/api/telegram/
@PillBoxNotificationBot
, you will see that backend server receives POST request containing information about the message.But I recommend not to try this at home... except when you really need it for debugging!
Open again for Reference
Currently implemented webhook for telegram bot, such that when bot receives some message, the telegram server sends us post request to notify us.