Developer docs

Deep links (telvoro:// ↔ https://telvoro.app)

On this page

One link system, modelled on Telegram’s tg:// ↔ t.me. Every link has an app form (custom scheme) and, unless it only makes sense inside the app, a web form on https://telvoro.app. The two map 1:1, and the web app takes the same web path after #.

PieceWhere
Parser / serializer (client)sdk/dart/lib/src/links/telvoro_link.dart (TelvoroLink, sealed, one class per link type)
Web → app mapping, landing pages, well-known files (server)server/internal/links, server/internal/service/links_web.go, server/internal/config/links.go
Shared test vectors (both sides must agree)docs/link_vectors.json
App router (link → confirmation → screen)app/lib/links/link_router.dart, link_listener.dart, links_api.dart

The scheme is the constant telvoroScheme (Dart) / links.Scheme (Go). The legacy televo:// scheme and its old path forms (televo://addtheme/<slug>, televo://join/<hash>, televo://<username>, televo://app/<bot>/<app>) are accepted on input and never produced. tg:// is not accepted: Telegram’s links stay Telegram’s (exception: the server keeps reading tg://user?id= in Bot API text entities, for Bot API compatibility).

WhereWhat the user sees
Phone, app installediOS universal links and verified Android App Links open the app directly, no browser hop. The app routes the link (§6).
Phone, no appThe landing page (§4): a preview for public content, then Open in Telvoro (the scheme link), Open in Telvoro Web and download buttons.
Desktop browserThe landing page tries telvoro://… once on load (the desktop apps register the scheme, §7). If no app takes it, the page stays: Download and Open in Telvoro Web.
Web app (web.telvoro.app)https://web.telvoro.app/#/<same path and query> — e.g. /#/+AbCd…, /#/durov/42?comment=7. Logged in, the web app routes it in-app; logged out, after login.
Inside the appLinks in messages, inline buttons, callback answers and mini apps’ openTelegramLink go through the same router instead of the browser.

Invite links (telvoro.app/+<hash>) do all of the above. Their preview shows the chat’s title and member count when the link is valid (not revoked, expired or used up, and the chat not moderated or web-restricted) — what CheckInviteLink shows a non-member, like Telegram’s invite page. The about text is shown only for public chats. Approval links say Request to join. Joining always needs a tap in the app. Chat photos aren’t shown on the web yet (the landing page loads no images; §9).

2. Hosts

  • telvoro.app is the link host (also www.telvoro.app). No short host is needed: telvoro.app/+abc is already short (t.telvoro.app would be longer). If one is ever wanted for QR codes or SMS, buy a separate short domain and add it to the hosts list; don’t use a subdomain.
  • The static website owns /, /download, /faq, /premium, /developers, /blog, /legal/*, /updates/*, /assets/*. The front proxy sends everything else (including /.well-known/*) to televod, which answers every link path with a landing page and anything else with a 404 page. These paths, televod’s own routes (/v1, /bot…, /file, /webapp, /s/, /healthz, /admin) and the link route names are reserved: they can’t be usernames (links.Reserved, enforced by validUsername).
  • On a dev server, links use the server’s own origin (http://10.0.2.2:8080/+abc); the app accepts its server’s host besides the defaults (linkHosts). --dart-define=TELEVO_LINK_BASE / TELEVO_LINK_HOSTS override.

“Confirm” = the app asks (or shows a sheet with the action button) before anything changes. “Server check” = what the server enforces when the app acts on it.

Type (TelvoroLink)App formWeb formConfirmServer check
UsernameLinktelvoro://resolve?domain=<u>/<u>noResolveUsername (privacy, moderation)
PublicPostLinkresolve?domain=<u>&post=<id>[&thread=][&comment=][&t=][&single]/<u>/<id>[?…], /<u>/<thread>/<id>, /s/<u>/<id>noResolveMessageLink
PrivatePostLinkprivatepost?channel=<chat>&post=<id>[&…]/c/<chat>/<id>, /c/<chat>/<thread>/<id>noResolveMessageLink: members only (CHAT_NOT_FOUND otherwise, same as an unknown chat)
BotStartLinkresolve?domain=<bot>&start=<p>/<bot>?start=<p>yes (Start)bot exists; /start <p> is a normal message
BotAddToChatLinkresolve?domain=<bot>&startgroup=<p>[&admin=…], …&startchannel&admin=…/<bot>?startgroup=<p>&admin=change_info+post_messagesyes (pick chat + confirm rights)AddMembers / SetMemberRole need my admin rights
BotAppLinkresolve?domain=<bot>[&appname=<a>]&startapp=<p>[&mode=compact|fullscreen]/<bot>?startapp=<p>, /<bot>/<a>?startapp=<p>yesRequestWebView (MINIAPPS.md)
AttachMenuLinkresolve?domain=<bot>&startattach=<p>[&choose=users+groups]/<bot>?startattach=<p>yesas above
PhoneLinkresolve?phone=<digits>/+<digits>noResolvePhone (phone privacy)
JoinChatLinkjoin?invite=<hash>/+<hash>, /joinchat/<hash>yes (Join / Request to join)CheckInviteLink, JoinByInvite (expiry, limit, approval)
UserIdLinkuser?id=<id>—noGetUsers (only users I may see)
StickerSetLinkaddstickers?set=<name>, addemoji?set=<name>/addstickers/<name>, /addemoji/<name>yes (Add)GetStickerSet
ThemeLinkaddtheme?slug=<s>/addtheme/<s>yes (preview → Install)ThemesService (takedown)
WallpaperLinkbg?slug=<s>/bg/<s>yesThemesService
SetLanguageLinksetlanguage?lang=<code>/setlanguage/<code>yesofficial packs
AddLanguageLinkaddlanguage?slug=<s>/addlanguage/<s>yesResolveLangPack (unofficial label)
ShareUrlLinkmsg_url?url=<u>&text=<t> (also msg, share)/share/url?url=&text=, /share?url=yes (pick chat; text goes to the composer, never sent by the link)—
LoginTokenLinklogin?token=<t>—yes, with a warningAcceptLoginToken (single use, expiry)
InvoiceSlugLinkinvoice?slug=<s>/invoice/<s>yes (Pay)PaymentsService
PaymentStatusLinkpayment?id=<id>&status=success|cancel—no (wakes the app; the webhook settles)—
BoostLinkboost?domain=<u>, boost?channel=<id>/boost/<u>, /boost?c=<id>yes (Boost button)ApplyBoost (premium)
SettingsLinksettings[/privacy|devices|language|themes|folders|premium]/settings[/…]no—
CaptchaLinkcaptcha?challenge_id=&captcha_token=—— (only inside the challenge web view; ignored from the OS)§21.1
UnsupportedLinkany other telvoro:// route, or a link path of ours with bad parametersshows Update the app

Not supported (they parse as UnsupportedLink): proxy / socks (the client has no user-configurable proxy), addlist (no shared folders yet), giftcode (no gift codes yet), Telegram’s bg?color= / gradient wallpapers, voicechat / livestream.

Canonical forms: parameters in the order shown, values escaped like Go’s url.QueryEscape, empty values as bare keys (startchannel, single, startapp), t in seconds (1m30s is accepted), list values joined with +. The SDK’s toAppUri(), toWebUrl(), toWebAppUrl() and toShareUrl() (web when there is one) build them.

Parameter rules

ParameterRule
username^[A-Za-z][A-Za-z0-9_]{3,31}$, no trailing or double _
start, startgroup, startattach[A-Za-z0-9_-]{0,64}
startapp[A-Za-z0-9_-]{0,512}; app name: [A-Za-z0-9_]{1,64} with a letter
adminknown Telegram right names, unknown ones dropped
ids, post, comment, threadpositive decimal, no leading zero, ≤ 18 digits
invite hash[A-Za-z0-9_-]{8,64}; + followed by 7–15 digits is a phone number
sticker set[A-Za-z0-9_]{1,64}; theme / wallpaper slug [a-z0-9_]{5,32}; community pack [a-z0-9_]{3,32}; language ^[a-z]{2,3}(-[a-z0-9]{2,8}){0,3}$; invoice [A-Za-z0-9_-]{1,64}; login token [A-Za-z0-9_-]{16,128}
shareurl ≤ 2048, text ≤ 4096, at least one
whole link≤ 8192 characters; no control characters, spaces or \

4. Landing pages (televod)

GET /<anything not routed> → ServeLink:

  • A link path → a server-rendered page: title, og:* / twitter:* tags, Open in Telvoro (href = the app link), Open in Telvoro Web, download links (TELEVO_DOWNLOAD_IOS / _ANDROID / _DESKTOP, else TELEVO_DOWNLOAD_URL, else <public url>/download). On desktop browsers one nonce’d inline script tries the app link.
  • Previews only for public objects: users with a username (name, @username), bots (their description), public groups and channels (title, about, members, a link to the /s/ web preview), sticker sets (title), valid invite links (§1). Generic pages, with no lookup result in them, for private posts, phone numbers, invalid invites, themes, invoices, shares, settings. An unknown username gets the same generic page (no existence oracle beyond the public CheckUsername).
  • Like the /s/ preview (PROTOCOL.md §22.6): a restriction_reason for web/all replaces the description with its text, sensitive chats show a notice instead of the about text, banned / deleted / moderated objects show nothing.
  • Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; script-src 'nonce-…'; img-src 'none'; frame-ancestors 'none', X-Frame-Options: DENY, Referrer-Policy: no-referrer. Public previews are cacheable for 60 s and indexable; everything else is no-store + noindex. Shared text and URLs are never echoed.
  • Anything else → a 404 page.
  • Public posts (/<u>/<id>, /s/…) keep the channels web preview (channels_web.go); its Open in Telvoro button now uses the app link. Private posts get the generic landing page (they used to 302 to the scheme, which fails without the app).
FileContentConfig
/.well-known/apple-app-site-association (also /apple-app-site-association)applinks with components (iOS 13+) and paths (older): the home page, the website paths and televod’s own routes are excluded, everything else (/*) opens the app; webcredentials (passwords, passkeys); optional appclips. 404 until a team id is set.TELEVO_APPLE_TEAM_ID, TELEVO_APPLE_BUNDLE_IDS (default net.televo.televoApp; app.telvoro after the rename), TELEVO_APPLE_WEBCREDENTIALS (default: the applinks ids; off), TELEVO_APPLE_APPCLIPS
/.well-known/assetlinks.jsonhandle_all_urls + get_login_creds (passkeys / saved credentials) for the release app, with Android 15 dynamic_app_link_components excluding the website paths; in dev also the debug keystore for both ids; extra statements appended verbatim.TELEVO_ANDROID_PACKAGE (default app.telvoro), TELEVO_ANDROID_CERT_SHA256 (default the release cert 68:08:51:…:7D:85; add the Play app-signing key; off), TELEVO_ANDROID_DEBUG_CERT_SHA256 (dev only, default the build Mac’s debug key), TELEVO_ANDROID_RELATIONS, TELEVO_ASSETLINKS_EXTRA (JSON array, e.g. a web target)

Both are application/json, served without redirects, cached for an hour. TELEVO_WEB_APP_URL (default https://web.telvoro.app, off) sets the web-app button.

Older Android versions (before 15) can’t exclude paths, so the app gets website paths too; the router doesn’t treat them as links, and they open in the browser.

6. App

  • One router: openLink / handleAppLink (link_router.dart) → routeLink(TelvoroLink). DeepLinkListener (wraps the logged-in UI) feeds it OS links (app_links: cold start + stream) and, on the web, the URL fragment. Message links, inline-button URLs, callback answer URLs and mini apps’ internal links try the router first, then the browser.
  • The old per-feature parsers are thin wrappers over TelvoroLink with the same API: parseShareLink / ShareLink (themes), PostLink (channels), setLanguageLinkCode, stickerSetLinkName, invoiceLinkSlug, paymentLinkId, parsePaymentLink. Their televo:// outputs are now telvoro://.
  • Copy link builds the web form: a chat’s public link (chat info), posts (message menu; private chats get the server’s /c/… link), invite links (server), themes / wallpapers / language packs (server’s link field), sticker sets (sheet).
  • QR login: the app has no scanner yet; a scanned telvoro://login?token= opened by the OS camera reaches the router, which asks before AcceptLoginToken.

7. Platform registration

PlatformSchemehttps
Androidintent filter telvoro, televoautoVerify filter for telvoro.app, www.telvoro.app
iOSCFBundleURLTypes: telvoro, televocom.apple.developer.associated-domains: applinks:telvoro.app, applinks:www.telvoro.app, webcredentials:telvoro.app (needs the capability on the App ID / profile)
macOSCFBundleURLTypes: telvoro, televonot yet (needs a provisioning profile with associated domains; the scheme covers desktop)
Windowsregistered per user under HKCU\Software\Classes\telvoro / televo on start; a second instance hands its link to the running one (SendAppLink)—
LinuxG_APPLICATION_HANDLES_COMMAND_LINE (single instance, the gtk package forwards the link); linux/packaging/net.televo.televo_app.desktop with MimeType=x-scheme-handler/telvoro;x-scheme-handler/televo (install + update-desktop-database)—
Web—web.telvoro.app/#/<web path>

8. Security rules

  1. Nothing state-changing without a tap: join, request to join, start a bot, add a bot (the chat is picked and the requested rights are listed), open a mini app, install stickers / themes / packs, change the language, pay, boost, log another device in (with a phishing warning), share (the text only lands in the composer).
  2. No open redirects: the server never redirects to a URL from a link; landing pages link only to the app link it built itself, the web app and the configured download URLs.
  3. Strict parameters (§3); unknown query keys are ignored, unknown routes of ours show Update the app instead of failing silently; malformed escapes never throw.
  4. https links count only on our hosts (telvoro.app, www.telvoro.app, the session’s server); user@host forms and look-alike hosts are not ours.
  5. Private chats leak nothing on the web; private post links resolve for members only, on the server.
  6. The CAPTCHA hand-back works only inside the challenge web view; the server allows only app schemes and loopback as its redirect_uri (§21.1).

9. Deferred / open

  • Chat photos in landing previews (needs a public, signed avatar URL and img-src).
  • Landing-page text is English only (server i18n catalogs later).
  • t (media timestamp) and thread are parsed and kept but the app opens the post without seeking / opening the thread yet; single is ignored.
  • macOS universal links; a QR scanner for login; links arriving while logged out are not queued (the cold-start link is).
  • proxy, addlist, giftcode, colour wallpapers: when the features exist.

10. Device test (Android)

Run by the device agent once an APK with these filters is installed (adb only; App Links verification needs the real domain serving assetlinks.json; until then the https links open the chooser or the browser):

for l in \
  'telvoro://resolve?domain=TelevoSupport' \
  'telvoro://resolve?domain=helpbot&start=ref_42' \
  'telvoro://resolve?domain=helpbot&startgroup=x&admin=change_info+post_messages' \
  'telvoro://resolve?domain=helpbot&startapp=abc' \
  'telvoro://resolve?phone=15551234567' \
  'telvoro://join?invite=AbCdEf0123_-xyZ' \
  'telvoro://privatepost?channel=1000123&post=55' \
  'telvoro://user?id=1' \
  'telvoro://addstickers?set=Cats' \
  'telvoro://addtheme?slug=night_blue' \
  'telvoro://bg?slug=sunset_01' \
  'telvoro://setlanguage?lang=de' \
  'telvoro://addlanguage?slug=pirate' \
  'telvoro://msg_url?url=https%3A%2F%2Fexample.com&text=hi' \
  'telvoro://login?token=AbCdEfGhIjKlMnOpQrSt' \
  'telvoro://invoice?slug=AbC-12_x' \
  'telvoro://payment?id=1&status=cancel' \
  'telvoro://boost?domain=dailynews' \
  'telvoro://settings/privacy' \
  'telvoro://settings/devices' \
  'telvoro://newfeature' \
  'televo://addtheme/night_blue' \
  'https://telvoro.app/+AbCdEf0123_-xyZ' \
  'https://telvoro.app/durov/42?comment=7' \
  'https://telvoro.app/settings/themes' \
; do
  adb shell am start -W -a android.intent.action.VIEW -d "'$l'" net.televo.televo_app
  sleep 3
done
adb shell pm get-app-links net.televo.televo_app

Use app.telvoro as the package after the rename.

Generated from docs/LINKS.md in the Telvoro repository. Wire names such as televo.v1 are unchanged.