Skip to content
All recipes
Bot

Deploy Telegram bot

A webhook bot that receives Telegram updates at its aidrop address and calls the Bot API over HTTPS.

Why use it

Give customers or a community a command, notification or support interface inside Telegram.

Build plan

  1. Expose POST /telegram/webhook and validate Telegram’s secret-token header.
  2. Keep the BotFather token and webhook secret in runtime values, never in the repository.
  3. Deploy first, then call setWebhook with the public HTTPS address and selected update types.

Resources and values

Resources
1 ServiceTelegram Bot API
Required values
TELEGRAM_BOT_TOKENTELEGRAM_WEBHOOK_SECRETPUBLIC_URL
Check before you deploy

Telegram retries unsuccessful webhook requests. Return a successful response only after the update has been accepted for processing.

Ask your coding agent

Prepare this Telegram bot for aidrop in webhook mode. Read TELEGRAM_BOT_TOKEN and TELEGRAM_WEBHOOK_SECRET from runtime values, expose POST /telegram/webhook and GET /health, validate X-Telegram-Bot-Api-Secret-Token and bind to 0.0.0.0:3000. Deploy first, then register the resulting HTTPS URL with setWebhook and a secret_token. Return the bot address and the webhook status without printing either secret.

Put Telegram bot online

Connect your coding agent, paste the quickstart and keep the build, runtime and public address in one aidrop Project.

7 days free · No credit card required