I
I
Ivan Cherny2021-12-17 18:12:48
Python
Ivan Cherny, 2021-12-17 18:12:48

How to delete webhook in telebot?

When I run the project, only one inscription appears:
2021-12-17 18:11:11,093 (__init__.py:694 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 409. Description: Conflict: can 't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first"
How to solve?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-12-17
@SoreMix

bot.delete_webhook()before creating a new hook.
All methods from pytelegrambotapi match method names from https://core.telegram.org/bots/api , only using snake_case

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question