tg-bot-opslisted
Install: claude install-skill serejaris/telegram-skills
# tg-bot-ops
Checked against the official docs on 2026-10-30: Bot API 10.3 (August 24, 2026). Reports from trackers are labeled with their date. No scenario here was run against a live bot; [scripts/retry_policy.py](scripts/retry_policy.py) has unit tests on simulated responses.
## Webhook or polling
Mutually exclusive. Either way, Telegram keeps undelivered updates [at most 24 hours](https://core.telegram.org/bots/api#getting-updates).
| | Long polling | Webhook |
|---|---|---|
| Fits | one process, no public HTTPS, a local machine | several workers, serverless |
| Ack | next `getUpdates` with a higher `offset` | your 2xx response |
| Limits | `limit` 1-100, `timeout` above 0 | ports 443, 80, 88, 8443; `max_connections` 1-100, default 40 |
| Failure | the same updates return until `offset` moves | non-2xx is repeated, then Telegram gives up "after a reasonable amount of attempts" |
Switching: `getUpdates` doesn't work while a webhook is set; use `deleteWebhook`. Keep `drop_pending_updates` off on a selling bot: it discards unprocessed `successful_payment` messages too.
Monitor `getWebhookInfo`: `pending_update_count`, `last_error_message`, `last_error_date`, `allowed_updates`.
A reply in the webhook response body (`method` plus parameters) saves a request, but its success and result can't be known. Use a normal request for anything you must confirm.
Webhook setup:
1. `setWebhook` with `secret_token`: 1-256 characters of `A-Za-z0-9_-`.
2. Reject any request whose `X-