Spread the love

When you create a bot to serve your telegram clients you need to add a public url to that bot. Once you registered, when updates are available on our bot, our registered url(WebHook) will be called automatically.

Here I will show you the simplest way of how to set telegram bot webhook.

For this tutorial I am using the REST client postman for that, but you can do that with  Insomnia and CURL as well.

Open postman and make HTTP POST request to https://api.telegram.org/bot{Your_bot_token}/setWebhook

For Instance:

Then, Provide a form-data URL with your public URL. You need to make sure to use the https one. After you’re all set click enter.

set telegram webhook with postman

You should see response like this:

    "ok": true,
    "result": true,
    "description":"Webhook was set"

That’s it!

Now if you enter the following URL on postman


In our case


you should see the following message.

    "ok": true,
    "result": {
        "url": "https://fdbb70c515dc.ngrok.io",
        "has_custom_certificate": false,
        "pending_update_count": 0,
        "max_connections": 40


booska · March 26, 2021 at 11:25 pm

it didnt work for when i did the POST request
“ok”: true,
“result”: true,
“description”: “Webhook is already deleted”

telegrama web · April 22, 2021 at 3:17 am

Gracias x la información, me ha sido muy util.

Leave a Reply

Your email address will not be published. Required fields are marked *