Which method in telegram bot api more effective, getUpdates or setWebHook? Which one is faster?
P.S. I use telegram-bot api for C#.
Which method in telegram bot api more effective, getUpdates or setWebHook? Which one is faster?
P.S. I use telegram-bot api for C#.
Typically getUpdates used for debugging. For publishing your bot you need to use Webhook.
getUpdates is a pull mechanism, setWebhook is push. There are some advantages of using a Webhook over getUpdates:
- Avoids your bot having to ask for updates frequently.
- Avoids the need for some kind of polling mechanism in your code.
See this useful document.