Developer docs

Client developer guide

On this page

Telvoro welcomes third-party clients. The protocol is open and nothing relies on a client keeping a secret: the server decides everything from what it can observe. This page summarises what your client needs to handle beyond the core protocol. The normative text is §21 of the protocol.

1. Register your app (api_id) — optional

Call ClientsService/RegisterApp with a title, short name, URL, platform and description (any account may register up to 5 apps). You get a ClientApp with an api_id. Send it as ClientHello.api_id on WebSocket/QUIC, or in the X-Televo-Api-Id header over HTTP. ClientsService/GetMyApps lists your apps.

An api_id is a public label, not a credential — there is no app secret. Unregistered clients work too, at the lowest rate-limit tier:

TierBudget multiplier
unregistered×0.5
registered×1
throttled by the operator×0.25, plus a shared cap for the app
attested device (any api_id)×2

An operator can block an api_id entirely (403 API_ID_BLOCKED); the same account keeps working from other clients. Details: §21.2.

2. Handle CAPTCHA_REQUIRED — required

When a request looks risky (sign-up, sign-in, messaging strangers, joining or creating many chats, creating bots), the server answers 403 CAPTCHA_REQUIRED with a challenge (Error.captcha: id, url, action, expiry, provider). Your client must:

  1. Open the challenge url in a browser or web view. Add redirect_uri (a custom scheme such as myclient://captcha, or a loopback URL) to get the token back automatically; otherwise the page shows the token for copy and paste.
  2. Receive the captcha token — via the redirect (?challenge_id=…&captcha_token=…), a postMessage of {type: "televo-captcha", challenge_id, captcha_token}, an injected TelevoCaptcha JavaScript channel, or the user pasting it.
  3. Repeat the original request unchanged, with the token in RpcRequest.captcha_token (WebSocket/QUIC) or the X-Televo-Captcha-Token header (HTTP/Connect).

Tokens are single use, valid for about 5 minutes, and only for the same action and identifier/session. Solve one challenge at a time and give up after a few rounds; never loop silently. Details: §21.1.

3. Device attestation — optional

Builds that can attest (Play-signed Android with Play Integrity, App Store iOS with App Attest) may call IntegrityService/GetAttestChallenge and Attest to get a trust token, then send it as ClientHello.attestation_token (X-Televo-Attestation over HTTP). Attestation only raises budgets; it never gates access, and a failure simply leaves the client unattested. Open-source forks and third-party clients normally skip this step. Details: §21.3.

4. Push notifications

Apple and Google only accept pushes signed with the app’s own credentials, so third-party clients use Web Push, UnifiedPush, or their own push gateway. See §11.

5. Conformance checklist

Before you ship, check every item of the client conformance checklist (§10), including:

  • send hello first and handle welcome.error;
  • retry SendMessage with the same random_id;
  • detect update gaps and fetch the difference;
  • handle FLOOD_WAIT, SLOWMODE_WAIT, PEER_FLOOD, moderation states and DC_MIGRATE;
  • handle CAPTCHA_REQUIRED and API_ID_BLOCKED, and send your registered api_id;
  • never log or send the session token anywhere except the Telvoro server, and verify TLS certificates;
  • use UTF-16 offsets for message entities.

Secret chats must use an established Olm implementation (vodozemac or a libolm-compatible library); never implement the ratchet yourself (§7).

Naming your client

Your client must not present itself as the official Telvoro app. Please don’t use the Telvoro logo as your app icon; see the brand guidelines.