Telegram bot setup via BotFather
Why Telegram
Three patterns where Telegram fits:
- International audience. Telegram is dominant in Eastern Europe, Iran, parts of Southeast Asia, and growing in India. About 950 million monthly active users globally.
- Group support. Add the bot to a Telegram group; group members can
/askit. Works for community-driven products. - Free messaging. Unlike WhatsApp, Telegram doesn't charge per message. Useful for high-volume B2C support.
Trade-off: Telegram has lower per-user trust than WhatsApp in some markets. Pick the channel matching your audience.
What BotFather is
BotFather is Telegram's official bot for creating other bots. You message it; it issues you a bot token. Standard onboarding tool for all Telegram bots.
Find it at @BotFather in any Telegram client (mobile, desktop, web).
Setup walkthrough
About 10 minutes:
Step 1: open BotFather
In Telegram, search for @BotFather. Click "Start" or send /start.
You'll see a list of bot management commands.
Step 2: create a new bot
Send /newbot.
BotFather asks for:
- Display name. What users see (e.g., "Acme Support"). Can include spaces, emoji, special characters.
- Username. Must end in
bot, lowercase, 5-32 characters (e.g.,acme_support_bot).
If the username is taken, BotFather asks for another. Pick something unique.
Step 3: copy the bot token
BotFather replies with the token, looking like:
1234567890:AAEhBP0av54bSeJ4-ZuPe_a8eXJSL7Z9OsMCopy it. Keep it secret; this token grants full bot control. Never check it into git or share publicly.
Step 4: paste into AskVault
In your dashboard:
- Open Channels > Telegram.
- Paste the bot token.
- Click "Connect bot".
AskVault registers your bot's webhook automatically, with a URL and secret unique to your connection. You should see "Connected" within 30 seconds.
Step 5: test
Open Telegram, search your bot's username (e.g., @acme_support_bot), click Start.
Send "hello" or any question your knowledge base covers. The bot should reply in a few seconds.
Configuring bot settings
Optional but recommended via BotFather:
/setdescription · Short description users see before clicking Start.
"Get instant answers to your Acme account questions. Powered by AskVault."
/setabouttext · Longer about text on the bot's profile.
/setuserpic · Profile picture (your company logo).
/setcommands · Custom slash commands users see in the menu:
help - Show how to use this botask - Ask a questionescalate - Talk to a human agentstatus - Check order statusAskVault does not set the command menu for you. Use /setcommands in BotFather to define it.
Privacy mode
Telegram bots have a "privacy mode" toggle:
- Privacy mode ON (default). Bot only sees messages addressed to it directly or via slash commands. Good for noisy group chats.
- Privacy mode OFF. Bot sees every message in groups it's in. Useful when the bot should listen for keywords across all messages.
Set via BotFather: /setprivacy then pick your bot, then Enable or Disable.
For AskVault, privacy mode ON is the default. Change only if you have a specific need.
Adding the bot to groups
Two patterns:
Group chat support. Add the bot to a group. Members can mention @your_bot_name [question] or use slash commands. Useful for community Q&A.
Direct messages. Users DM the bot directly. Typical 1:1 support flow.
Both work; combine as needed.
Webhook configuration
AskVault sets the webhook automatically. For debugging:
Get current webhook info:
curl https://api.telegram.org/bot{your_token}/getWebhookInfoIf the webhook gets out of sync (rare), don't set it by hand: the URL and secret are specific to your connection. Disconnect and reconnect the bot in Channels > Telegram, which registers the webhook again.
Bot token security
The token is sensitive:
- Never commit to git. Use environment variables.
- Rotate if leaked. BotFather >
/revoketo invalidate the old token;/tokento get a new one. - AskVault stores it encrypted at rest. Never logged or exposed in error messages.
Rotation takes about 60 seconds. Update AskVault with the new token immediately to avoid downtime.
Common pitfalls
Bot doesn't respond. Webhook not set correctly. Disconnect and reconnect the bot in Channels > Telegram, which registers the webhook again.
Bot responds in groups but not DMs. Privacy mode flipped. Check via BotFather /setprivacy.
Slash commands don't autocomplete. Command list not registered. Set it in BotFather with /setcommands; AskVault does not do this for you.
"Conflict" error. Two bots or two AskVault workspaces both registered the same token. Revoke the duplicate webhook.
Bot management commands (BotFather)
Common commands to remember:
/mybots· list your bots and pick one to manage./setname· change display name./setdescription· change description./setcommands· set slash command list./setprivacy· toggle privacy mode./revoke· invalidate the current token./token· get the current token (or a new one after revoke)./deletebot· delete the bot entirely.
Every command works on any bot you own.
Planned features (on the roadmap)
Documented for accuracy:
- Inline mode. Today, AskVault handles standard message and slash commands. Telegram inline-bot mode (e.g., typing
@your_bot queryin any chat) planned. - Stickers and rich media. Today, AskVault sends text and links. Stickers, custom media planned.
Limits
- Bots per Telegram account. 20 (Telegram limit).
- Bots per AskVault workspace. No hard cap; one common per workspace.
- Messages per second. Telegram allows 30 messages per second per bot.
- Message length. 4,096 characters; AskVault splits longer responses.
FAQ
Is Telegram free?
Yes. Telegram doesn't charge for bot messages. No per-message cost like WhatsApp.
Can I use the same bot for multiple workspaces?
No. One Telegram bot maps to one AskVault workspace. Create separate bots for separate workspaces.
What if my bot username is taken?
Pick another. Telegram bot usernames must be unique globally and end in bot.
Can users send images or files to my bot?
Yes, and they get a reply, but AskVault doesn't open the attachment. Images aren't viewed, files aren't opened, and voice messages aren't transcribed. The attachment isn't stored.
- With a caption: the bot answers the text the customer typed with the attachment, just like a typed message. The reply ends with a short note that the attachment itself wasn't looked at.
- Without a caption: the bot replies that it can't view the attachment and asks the customer to send their question as a message. This reply doesn't use message credits. Your inbox shows that an attachment arrived (for example
[image]). - Stickers and locations get no reply.
- If a teammate has taken over the conversation, the bot doesn't reply.
In a group, the bot answers a photo or file only when it has a caption, the same way it answers text messages there. A photo or file posted without a caption gets no reply.
See Voice messages, photos and files for every channel.
Can I migrate from another Telegram bot platform?
Yes. Revoke the old platform's webhook, then paste the same token into AskVault, which registers its own webhook. Existing user conversations continue.