Telegram username verification by one-time code
Every Telegram user with a public username can be verified. TeleAuth sends a six-digit code to that username through your connected bot, and your backend confirms the code in a second API call.
How it works
Verification is two HTTP requests and a message the user already knows how to read.
- Collect the Telegram username in your app or website
- POST /v1/otp/send with the username
- The user receives the code in your bot's chat
- POST /v1/otp/verify with the same username and the code
Send a verification code
Use the project API key from your dashboard. Keep it on your server and never expose it to the browser.
curl -X POST https://teleauth.run.place/api/public/v1/otp/send \
-H "x-api-key: $TELEAUTH_API_KEY" \
-H "content-type: application/json" \
-d '{ "username": "ada_lovelace" }'What if the user has not started the bot?
Telegram blocks messages to users who never opened your bot. Show your bot's deep link, ask the user to press Start, then retry the send.
Common questions
Can I verify a user without a username?
Not directly. The public API uses Telegram usernames. Ask the user to set a username in Telegram Settings, or use the Telegram Login Widget alongside TeleAuth.
Does the user need to share their phone number?
No. TeleAuth never asks for a phone number or contact. The code is delivered to the Telegram username only.
Related guides
More ways to use Telegram for authentication and verification.
Telegram bot OTP verification
Step-by-step guide to sending verification codes from your own Telegram bot: create the bot, connect the token, wire the webhook and send your first OTP.
Telegram OTP API
Send and verify one-time passwords through Telegram with two REST calls. Project API keys, 5-minute code expiry, signed webhooks and delivery logs.
Telegram Login Widget alternative
A Telegram Login Widget alternative you control: no third-party iframe, no domain lock-in. Verify users with your own bot through a simple REST API.
Try telegram username verification with TeleAuth
Create a project, connect your Telegram bot, and send your first OTP in minutes.
Create free account