LIVE PORTAL Telegram v11.8 API Synchronized Free Animated Stickers
shield_person ADMIN LOGGED IN + Write Guide
admin_panel_settings ADMIN CONTROLS Guide #11039 • tips
How to Use Log In with Telegram: One-Tap WebAuth, Seamless Phone Verification & Bot Service Alerts
key Decentralized Identity & Cryptographic Auth

How to Use Log In with Telegram

Implement passwordless one-tap WebAuth sign-in, eliminate SMS intercept vulnerabilities, and authorize third-party web services with cryptographically verified HMAC signatures.

Traditional web authentication reliant on passwords and SMS one-time passcodes (OTPs) is notoriously vulnerable to data breaches, phishing kits, and SIM-swapping attacks. Log In with Telegram provides web developers and end users with a frictionless, high-security OAuth2 alternative. By linking a Telegram bot to your web application, users can authenticate in a single tap without revealing their phone number, while web backends verify authenticity using cryptographic SHA-256 HMAC tokens generated directly by Telegram's core infrastructure.

touch_app

Passwordless 1-Tap Login

Users click a single button to sign in. No passwords to remember, no CAPTCHAs to solve, and zero friction across desktop and mobile browsers.

phonelink_lock

Zero SMS Cost & Anti-SIM Swap

Verification requests arrive instantly inside Telegram via the official Service Notifications channel, completely bypassing telecom SMS intercept risks.

security

Centralized Session Control

Users retain complete sovereign control over authorizations, viewing all connected third-party websites in Telegram Settings and revoking access instantly.

OAuth2 WebAuth & HMAC Token Simulator

Simulate the client authorization sequence and inspect the cryptographic payload passed to web servers.

fingerprint
https://example-saas.com/login

Sign in to Cloud Dashboard

Authorize with your Telegram identity to continue.

// Awaiting user authorization click... // When clicked, Telegram Widget dispatches verified auth data.

Cryptographic Architecture: How Telegram HMAC Verification Operates

When a user authorizes access via the Telegram Login Widget, the web client receives a JSON payload containing the user's public profile fields (id, first_name, username, auth_date, and photo_url) alongside an HMAC-SHA256 signature hash. To guarantee that malicious actors have not forged the user identity, the developer's server verifies the hash using a secret key derived from their Telegram Bot Token.

Step / Component Implementation Detail Security Mechanism
1. Key Derivation secret_key = SHA256(bot_token) Prevents raw bot token exposure in transit
2. Data String Assembly Alphabetically sorted key-value pairs joined with newline (LF) delimiter Canonical representation prevents parameter tampering
3. HMAC Validation HMAC_SHA256(data_check_string, secret_key) == hash Cryptographic proof of Telegram origin
4. Anti-Replay Check abs(time() - auth_date) < 86400 Stops replay attacks using stale tokens older than 24h
5. Direct Notifications User receives Telegram security message: "You logged in to..." Immediate detection if user account is compromised

How to Set Up & Use Log In with Telegram

1

Creating the Auth Bot via @BotFather

Open Telegram and message @BotFather. Send /newbot to configure a dedicated authentication bot (e.g. @MyServiceAuthBot). Next, send /setdomain, choose your bot, and enter your website's exact production domain (e.g., app.example.com). Telegram will reject authentication attempts coming from unverified domains.

2

Embedding the Web Widget Script

Add the official script to your login page: <script async src="https://telegram.org/js/telegram-widget.js?22" data-telegram-login="MyServiceAuthBot" data-size="large" data-auth-url="https://app.example.com/api/auth/callback" data-request-access="write"></script>. Setting data-request-access="write" allows your bot to dispatch notifications directly to the user.

3

Reviewing & Revoking Authorized Sessions

As a user, you can view every website you have ever logged into with Telegram. Navigate to Settings > Privacy & Security > Active Sessions > Logged in with Telegram. Tap any connected service and select Disconnect to instantly revoke the website's access privileges.

Frequently Asked Questions

Does logging into a website with Telegram reveal my phone number? expand_more
No. The Telegram Login Widget only shares your public Telegram ID, First Name, Last Name, Username, and Avatar URL with the website. Your actual phone number remains completely confidential and is never passed to third parties.
Can a website read my private Telegram chats after I log in? expand_more
Never. Telegram's authentication protocol operates purely as an identity verification layer (OAuth2 OpenID). It grants zero permissions to access your private messages, group memberships, media files, or contact list.
What happens if my Telegram account has 2-Step Verification enabled? expand_more
When logging in on a new device or browser, Telegram prompts you inside your official Telegram client app for authorization. If your account has 2FA enabled, your account security settings ensure no unauthorized third party can log in without access to your primary authenticated Telegram apps.
How does this differ from Telegram Passkeys? expand_more
Passkeys authenticate your physical device directly into the official Telegram apps (iOS, Android, Desktop) using FIDO2 biometrics (Face ID/Fingerprint). Log In with Telegram, on the other hand, allows third-party web services to authenticate your identity using Telegram as the identity provider.
admin_panel_settings ADMIN Guide #11039 Actions
Enlarged Preview
Click anywhere outside or press ESC to close viewer
smart_display Telegram Video Short
1080p HD
Official Source: @TelegramTips Post #44 Press ESC or click outside to close