Developer docs
8. Errors and limits
On this page
Error{code, type, message, retry_after} — see transport.proto. Clients must handle:
420 FLOOD_WAIT: waitretry_afterseconds before retrying that method.401 AUTH_REQUIRED/SESSION_REVOKED: drop the token and show login.404 METHOD_NOT_FOUND: method unsupported by this server layer.303 DC_MIGRATE: repeat the request on DCdc_id(home or this request only, seemigrate_scopeand §16.5). Limits are announced inServerHello.config.
8.1 Abuse limits and moderation
Every rate limit answers 420 with retry_after (seconds). Risky sign-ups and bulk
actions may instead get 403 CAPTCHA_REQUIRED, and budgets depend on the client tier
(§21). The type says which kind:
type | Meaning | Client behaviour |
|---|---|---|
FLOOD_WAIT | a token bucket is empty (per session, per user across all sessions, per method, per chat, new-account budgets, duplicate content) | disable the action and show a countdown; retry after retry_after |
SLOWMODE_WAIT | the group’s slow mode; retry_after is the time left | countdown in the composer |
PEER_FLOOD | the daily budget of new cold peers is used up (people who are not your contact, don’t have you as a contact and never wrote to you); retry_after is when the oldest one ages out | banner explaining the limit; messages to people you already talk to keep working |
SMS_DAILY_LIMIT | the server’s daily SMS cost cap | “try later” |
Limits (defaults; operators tune TELEVO_*, see server/internal/config/abuse.go):
| Limit | Scope | Default |
|---|---|---|
| any method | per session | 30/s, burst 100 |
| any method | per user, all sessions together | 50/s, burst 150 |
| anonymous | per IP | 5/s, burst 30 |
| messages (send, album item, forward) | per user | 20/s, burst 60 |
| messages into a group/channel | per chat, all senders | 30/s, burst 150 |
| same text or media into > 5 distinct groups/channels | per user, 10 min | FLOOD_WAIT |
| new cold peers | per user per 24 h | 5 (account < 24 h), 20 (< 30 days), 50 (older); x4 verified; halved after reports from 3+ users |
| create groups/channels | per user per day | 3 (new account) / 50 |
| join chats (public or link) | per user per day | 20 (new) / 500 |
| add members | per added user per day | 50 (new) / 2000 |
| forward | per message per day | 300 (new) / 20000 |
| wrong invite hashes | per user | 20/hour |
| login codes | per IP 10/h, per network 60/h, per identifier 3 then 1/30 s, per phone prefix (+ and 5 digits) 30/h, SMS per day 1000 | |
SetPassword with a wrong current password | per user | 5/hour |
| Bot API | per bot: 30 req/s; 30 msg/s; 1 msg/s per private chat (burst 3); 20 msg/min per group | Telegram parity; 429 with parameters.retry_after |
Moderation. An account (users and bots alike) has a ModerationState; the self user
(GetMe, UserUpdated for me) carries User.moderation = ModerationStatus{state, denied, until, reason, appeal_url, new_account_until}. denied is the effective set of
withheld capabilities (state + targeted + new-account), so clients disable exactly those
actions. The capability matrix:
| Capability | active | new account (< 24 h) | limited | frozen | banned |
|---|---|---|---|---|---|
send_messages | ✓ | ✓ | ✓ | – | – |
message_strangers (DMs, secret chats, calls, adding to groups) | ✓ | ✓ (PEER_FLOOD budget) | – | – | – |
media_to_strangers (links/media/forwards to cold peers) | ✓ | – | – | – | – |
create_chats | ✓ | ✓ (3/day) | ✓ | – | – |
public_chats (public @username on a chat) | ✓ | ✓ | – | – | – |
join_public (public chats and invite links) | ✓ | ✓ (20/day) | – | – | – |
invite_users | ✓ | ✓ (50/day) | ✓ (contacts only) | – | – |
calls | ✓ | ✓ | ✓ (contacts only) | – | – |
edit_profile | ✓ | ✓ | ✓ | – | – |
create_bots | ✓ | ✓ | – | – | – |
| sessions | kept | kept | kept | kept | revoked, login refused (USER_BANNED) |
Moderators can also withhold single capabilities from an otherwise active account. A
withheld capability fails with 403 USER_RESTRICTED and Error.capability set to the
lowercase name above. A frozen account is read-only: every method outside a fixed
allowlist (reads, own settings, sessions, leaving chats, ending calls, reports, updates)
fails with 403 ACCOUNT_FROZEN; messages to the appeal bot (appeal_url,
televo://resolve?domain=<bot>) still go through, for limited accounts too. States may
carry an expiry (until); the server lifts them automatically. Accounts are limited
automatically (7 days, queued for operator review) when 10 distinct established accounts
(older than 7 days, not restricted themselves) report them within 24 h; verified accounts
are never restricted automatically.
Chats have a moderation state too: CHAT_FROZEN (nobody posts or joins) and
CHANNEL_BANNED (inaccessible). Chat.moderation_state tells members.
8.2 Content labels
Chat.sensitive: the owner (an admin withchange_info) labels a group/channel (EditChat.sensitive); moderators can force it (sensitive_locked, the owner gets403 SENSITIVE_LOCKEDwhen clearing it).restriction_reason(ChatandUser/bots):{platform, reason, text}as in Telegram;platformisall | ios | android | web | macos | windows | linux. A client whose platform matches (orall) showstextinstead of the content.UsersService/GetContentSettings/SetContentSettings: the account’s sensitive-content opt-in, stored on the server. Withage_confirmation_required, enabling needsconfirm_ageonce (403 AGE_VERIFICATION_REQUIRED). Restricted accounts can’t change it (sensitive_can_change).- Clients blur sensitive chats (avatar, last message, media) and ask before opening unless
opted in. Search and discovery leave out sensitive chats unless opted in, chats
restricted on the caller’s platform (
ClientHello.system) and banned chats. The message index is blind (§14), so filtering is per chat; chats you are in always show. - Messages: photo/video
spoiler(InputPhoto.spoiler,InputDocument.spoiler) blurs a single media item; the Bot API exposes it ashas_spoiler/has_media_spoiler.
Generated from docs/PROTOCOL.md in the Telvoro repository. Wire names such as televo.v1 are unchanged.