Tutorials

Connect a Telegram Bot in 5 Minutes

Six steps from zero to your first test message. Create the bot with BotFather, grab the token, paste it into Lane.Chat, webhook sets itself.

This is a checklist. Follow it top to bottom and you will have a working bot in roughly five minutes.

Step 1: Open the Lane.Chat dashboard and go to Channels

In the left nav, go to Channels → Telegram and click "Add new bot." The dashboard shows a webhook URL you will use in a later step.

Step 2: Open Telegram and message @BotFather with /newbot

In Telegram, search for @BotFather (make sure it is the one with the blue verified checkmark). Send /newbot. BotFather asks two questions: a display name for the bot and a username. The username must end in bot and must be globally unique.

Step 3: Copy the bot token

Once naming is done, BotFather replies with a message containing a long string like 1234567890:ABC.... That is your bot token. Treat it like a password — do not screenshot it into a shared channel.

Step 4: Paste the token into the Lane.Chat dashboard

Back in the Add Bot form, paste the token and click "Verify." Lane.Chat hits the Telegram API to confirm the token and pulls your bot's name and avatar automatically.

Step 5: Set the webhook

After verification, a "Set webhook" button appears. Click it. Lane.Chat calls Telegram's setWebhook endpoint for you and binds the webhook URL to your bot. No manual curl, no shell commands.

Step 6: Send a test message

In Telegram, search for the bot you just created (@YourBotUsername), hit Start, and send any message. Back in the Lane.Chat dashboard, the new conversation should appear in the Conversations list within a few seconds. Reply from the dashboard and the message should arrive on the Telegram side instantly.

What to do next

  • Configure a welcome message: Channels → Telegram → Welcome Message
  • Connect your knowledge base so the AI can auto-reply
  • For a Mini App, run /newapp with BotFather to provision one

截图清单 / Screenshots Checklist

  • 01-add-channel.png — Dashboard Channels page, Add new bot clicked
  • 02-botfather-newbot.png — BotFather /newbot conversation in Telegram
  • 03-token-received.png — BotFather message returning the bot token
  • 05-webhook-configured.png — Dashboard showing webhook set successfully
  • 06-test-message-received.png — Dashboard receiving the first test message