Seamless Telegram Web OAuth Login
Authenticate Telegram users onto web applications seamlessly with one tap using login_url.
The login_url Parameter
Instead of requiring users to enter passwords or 2FA codes on your website, you can attach a login_url button in Telegram chat. When clicked, Telegram securely prompts the user and passes verified user data via GET parameters to your auth endpoint.
login_url Integration
bot('sendMessage', [
'chat_id' => $chatId,
'text' => "🔐 Access Your Web Dashboard:
Click below to log in securely without entering credentials.",
'parse_mode' => 'HTML',
'reply_markup' => [
'inline_keyboard' => [
[
[
'text' => '🚀 One-Click Web Login',
'login_url' => [
'url' => 'https://botlify.cloud/login.php?telegram_oauth=1',
'forward_text' => 'Log in to Botlify Cloud',
'request_write_access' => true
]
]
]
]
]
]);
Botlify Cloud Runtime
Credentials are auto-injected in
Credentials are auto-injected in
.env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.