Developer docs
2. Authentication
On this page
SendCode(identifier) -> code_hash identifier = E.164 phone or email
SignIn(identifier, code_hash, code)
├─ user + token done
├─ signup_required + signup_token -> SignUp(signup_token, first_name, last_name)
└─ password_required + password_token -> CheckPassword(password_token, password)
ImportBotAuthorization(bot_token) -> token bots
- The
tokenis the only credential of a session (“device”). Store it in the OS key store (Keychain, Android Keystore, DPAPI, libsecret). Send it inClientHello.token(WS) orAuthorization: Bearer(HTTP). AuthService/GetSessionslists devices;TerminateSessionrevokes one. A revoked session receivesUpdate.session_revokedand every subsequent call fails with401 SESSION_REVOKED.- QR login: the new device calls
ExportLoginToken, renderstelevo://login?token=<token>as a QR code and pollsPollLoginTokenevery 2 s; an already logged-in device scans it and callsAcceptLoginToken. - Development servers (
TELEVO_DEV=1) accept identifiers+999XXXXXXwith code12345.
2.3 Phone-free login
AuthService/GetLoginOptions (public) tells a client what the server offers, so it
never shows a path that can’t work:
| name | meaning |
|---|---|
phone_code, email_code | SendCode can deliver codes of that kind (a provider is configured) |
password | in signup_methods: password sign-up without a verified identifier; in login_methods: password accounts can log in |
qr | QR login (ExportLoginToken) |
Unknown names are ignored. Servers without the RPC (METHOD_NOT_FOUND) offer codes only.
Password accounts (server flag TELEVO_SIGNUP_UNVERIFIED, SECURITY.md §10.8):
SignUpWithPassword(identifier, password, first_name, last_name) -> AuthResult (token)
SignInWithPassword(identifier, password) -> AuthResult (token)
identifier: an email, or@username(a bare name without@is a username too; 4..32 of[A-Za-z0-9_], starting with a letter). Emails are case-insensitive.- Errors:
SIGNUP_METHOD_UNAVAILABLE(403, flag off),PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG,PASSWORD_TOO_COMMON,EMAIL_INVALID,EMAIL_DOMAIN_BLOCKED,USERNAME_INVALID(400),EMAIL_OCCUPIED,USERNAME_OCCUPIED(409),SIGNUP_DAILY_LIMIT(420,retry_after= until the next UTC day), CAPTCHA_REQUIRED (§21.1). Login:PASSWORD_HASH_INVALIDfor a wrong identifier or password,FLOOD_WAITwhile locked out after repeated failures. - The email of a password account is unverified: it never receives or accepts
login codes, is not used for recovery or contact discovery, and is detached if its
real owner proves it.
GetLoginMethodslists it withverified = false. - Password login keeps working when the flag is turned off; only sign-up stops.
AuthService/GetLoginMethods (authenticated) lists the account’s login methods
(LoginMethod: phone, email, password, …; verified, display), has_password and
has_recovery_code.
Generated from docs/PROTOCOL.md in the Telvoro repository. Wire names such as televo.v1 are unchanged.