-1

Which method in telegram bot api more effective, getUpdates or setWebHook? Which one is faster?

P.S. I use telegram-bot api for C#.

1 Answers1

0

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:

  1. Avoids your bot having to ask for updates frequently.
  2. Avoids the need for some kind of polling mechanism in your code.

See this useful document.

n.y
  • 3,343
  • 3
  • 35
  • 54