POST /auth/nonce
Request a SIWE nonce. The nonce binds the wallet’s signed message to a single login attempt and prevents replay. Auth: none.EVM address that will sign. Lowercase 0x-prefixed.
POST /auth/verify
Verify the SIWE signature and issue a session cookie. Auth: none.Same address used in
/auth/nonce.The exact SIWE message returned by
/auth/nonce.Hex-encoded signature from the wallet.
Set-Cookie: af_session=...; HttpOnly; Secure; SameSite=Lax.
POST /auth/telegram
Used by the Telegram bot to mint a session for a Telegram user. Public integrators do not call this directly.Telegram WebApp initData payload, validated against the bot token.
/auth/verify, plus the linked Telegram identity in user.telegram.
POST /auth/access-code
Sign in or sign up via a one-time access code. Used in onboarding flows that bypass wallet/Telegram.Single-use access code.
POST /auth/logout
Clear the session cookie. Auth: required.204 No Content.
Errors
| Code | When |
|---|---|
nonce_expired | Nonce older than 5 minutes |
nonce_used | Nonce already verified |
signature_invalid | Signature does not match address |
telegram_invalid | initData hash mismatch |
code_invalid | Access code not found or used |