Skip to content

deleteWebhook

Eric Damian edited this page Feb 16, 2021 · 3 revisions

deleteWebhook Method:

Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.

Parameter Type Required Description
drop_pending_updates Boolean Optional Pass True to drop all pending updates (default true)

Example

from python_telegram_api import telegram_bot_api

bot = telegram_bot_api.TelegramBotApi('xxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy')
bot.setWebhook('https://d846cca677ee.ngrok.io')
print(bot.deleteWebhook())

>>> True
Clone this wiki locally