As per Telegram docs:
There are two mutually exclusive ways of receiving updates for your bot - the getUpdates
method on one hand and webhooks on the other.
Later, in the description of getUpdates method:
This method will not work if an outgoing webhook is set up.
Basically, there are two methods of how to receive updates (messages, new users etc.) of your Telegram bot. One is via getUpdates
method - when using this method, you should run getUpdates
method regularly to receive all the new updates.
The second method is via webhook - you set up a url where Telegram will send a request whenever your bot receives an Update. In most cases this is a more practical way to receive Updates, albeit a bit harder to implement.
These two methods are mutually exclusive - if you have webhook set up, you can't use getUpdates
method. The solution, if you want to use getUpdates
method, is to delete the webhook with the deleteWebhook method.