Validating Telegram Mini App initData on your server
A Telegram Mini App hands your page a signed initData string. Learn how to check its HMAC with your bot token, reject stale sessions with auth_date, and never trust initDataUnsafe.
Telegram bot commands menu: setMyCommands, scopes and languages
Set the / command menu with setMyCommands, show different commands to admins and groups with scopes, and translate the list by language, while still validating every command on your server.
Idempotent message handling for bots: IDs, retries and duplicates
Platforms deliver the same event more than once. Key Telegram update_id, Discord interaction and message IDs, and WhatsApp wamids so retries never run your side effects twice.
Telegram deep links: the start parameter for onboarding and account linking
Use t.me links with start, startgroup and startapp parameters to route new users, link accounts safely and add your bot to groups with the right admin rights.
Log in with Telegram on your website: the OpenID Connect flow
Let users sign in to your bot's website with their Telegram account using the current OpenID Connect flow, and verify every ID token on the server.
How to choose and rotate a webhook signing secret
Use a CSPRNG, store it like a password, and rotate with overlap.