Username verification

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.

Send OTP
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.

FAQ

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.

Try telegram username verification with TeleAuth

Create a project, connect your Telegram bot, and send your first OTP in minutes.

Create free account