Log in via Telegram and Max
instead of passwords and OAuth

Authorization Code flow, QR for desktop, cross-device polling. User clicks a link, confirms in the bot — you get their name, username and subscriber_id.

· Rate limit 5 sessions/hr, 300 s code TTL, atomic GETDEL

1 Scan QR
2 Confirm in bot
3 Code + auto-subscribe
User logged in
⌛ Waiting for confirmation…
POST /v1/auth/session PKCE · GETDEL атомарно
3
flows: link / session / QR
300 s
one-time code TTL
Bonus
auto-subscribe to your notifications
PKCE
OAuth 2.0 ready under the hood

Without us

Why your own bot-based OAuth is expensive

Authorization Code flow with state

CSRF state, TTL store, one-time codes, atomic GETDEL against TOCTOU — non-trivial to build right.

QR-polling for desktop

User on desktop, bot on phone. You need: show QR, wait for confirmation, don't crash after 5 minutes — sessions, polling, expiration.

Rate limit and bruteforce

Without limits on session creation your site becomes a link generator. You need sliding window rate limits per project and per IP.

What's inside

Three auth flows in one API

Static links

Simple case — permanent t.me/bot?start=auth_SLUG. One click → confirmation → your callback_url?code=...

Sessions with state

POST /v1/auth/session with your state. Returns session_id and bot links. Your state returns with the code — you tie it to your browser session.

QR + polling

Desktop login: QR with link + polling GET /v1/auth/session/:id/status every 2-3 seconds. When user confirms on phone — you get the code.

Auto-subscribe after login

ensure_subscribed() after confirmation adds the user to your project subscribers — so you can send them notifications right away.

Atomic GETDEL

A Lua GET+DEL script prevents code reuse between two requests (TOCTOU-safe).

auth.completed webhook

Event fires right after confirmation. You don't have to wait for the user to come back to the site — you can unblock their backend immediately.

How it works

Authorization Code flow in 3 steps

01

User clicks a link

The link opens @zapnotybot or the Max bot with an auth_SLUG deep link. The bot shows "Log into your project?" with Yes/No buttons.

02

Confirm in bot

Tapping "Yes" → auto-subscribe to notifications + one-time code in Redis. Bot edits the message to "Authorization confirmed ✅".

03

Callback with code

Your callback_url?code=CODE. POST /v1/auth/verify atomically consumes the code and returns user data: subscriber_id, first_name, username, lang.

FAQ

Frequently asked

Telegram Login Widget requires your own bot, domain setup, and doesn't support Max. Zapnoty is a SaaS layer: you get both channels, auto-subscription to your notifications, and a ready-made session API.

Max works without a VPN in Russia. If a user is on desktop without Telegram — we show them a QR for Max and a browser link. Auth works either way.

subscriber_id (UUID), channel (telegram/max), first_name, username, lang (ru/en), tags (array). Email and phone — not returned (Telegram/Max don't expose them).

The code is one-time — a GETDEL Lua script invalidates it right after verify. TTL 300 seconds. Rate limit 5 sessions/hr per project.

1 credit per successful auth (bot confirmation). On free plan — up to 100/month, on basic — up to 700.

Yes. If employees already use Telegram or Max — messenger login is faster and easier than classic corporate OAuth.

Free to start

Hook up in 5 minutes

No credit card. 100 free credits per month — enough to try every feature.