We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
The polling method may be easier to set up, as you don’t need to run an own webserver to implement webhooks, but it is harder to setup with BotPresto, and has various disadvantages and is not recommended.
You’ll need to point your code to BotPresto endpoint to poll for updates. This is not only more work, but also requires you to modify your bot’s code, which may not be possible if you’re using a third-party bot service.
If you decide to keep using polling, BotPresto will still help you to set everything up.
You need to frequently call getUpdates to get new messages. This is not only inefficient, but is also generally slower than webhooks, which provide near-realtime bot reactions to user actions.
Telegram limits the number of updates returned by getUpdates to 100 per call, and may throttle you if you make more than 1 call per second. This means that if your bot doesn’t manage to process 100 updates in a second, your bot may unexpectedly slow down significantly.
Some of BotPresto features cannot be provided for bots using polling:
Feature | Polling | Webhooks |
---|---|---|
Mixpanel integration | ✅ | ✅ |
Chatting with users | ✅ | ✅ |
Mass-messaging | ✅ | ✅ |
Fully automatic setup | ✅ | |
Fully automatic off-boarding | ✅ | |
Error recovery | ✅ | |
Maintenance mode | ✅ | |
Alerting | ✅ |