Create a Telegram Bot
This guide walks you through creating a Telegram bot using BotFather. Takes about 2 minutes.
Step 1: Open BotFather
- Open Telegram (app or web)
- Search for @BotFather
- Start a chat with BotFather
Important: Make sure you’re chatting with the official @BotFather (verified with a blue checkmark).
Step 2: Create a New Bot
- Send the command
/newbot - BotFather will ask for a name for your bot
- Enter a friendly name like “My Channel Tracker”
Step 3: Choose a Username
- BotFather asks for a username
- Must end in “bot” (e.g.,
mychanneltracker_bot) - Must be unique across Telegram
Tips for usernames:
- Keep it short and memorable
- Use your brand name +
_botsuffix - Examples:
brandname_bot,mychannel_tracker_bot
Step 4: Copy Your Bot Token
After creation, BotFather sends you a message with your bot token. It looks like:
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz123456789Keep this token secret! Anyone with the token can control your bot.
Step 5: Add Token to AdTarget
- Go to your AdTarget dashboard
- Navigate to Settings → Telegram Bots
- Click Add Bot
- Paste your bot token
- Click Connect
AdTarget will verify the token and show your bot’s username.
Bot Settings (Optional)
You can customize your bot through BotFather:
Set a Profile Picture
- Send
/setuserpicto BotFather - Select your bot
- Upload an image (ideally your brand logo)
Set a Description
- Send
/setdescriptionto BotFather - Select your bot
- Enter a description users see when they start the bot
Disable Group Privacy
To ensure your bot can see channel events:
- Send
/setprivacyto BotFather - Select your bot
- Choose Disable
This allows the bot to receive member events in groups/channels.
Security Best Practices
Protect your token:
- Never share your bot token publicly
- Don’t commit it to version control
- Rotate the token if compromised
To regenerate a token:
- Send
/revoketo BotFather - Select your bot
- BotFather generates a new token
- Update the token in AdTarget
Troubleshooting
BotFather not responding?
- Make sure you’re messaging the verified @BotFather
- Try closing and reopening the chat
- Check your internet connection
Username already taken?
- Try a more unique variation
- Add numbers or underscores
- Use your full brand name
Token not working in AdTarget?
- Copy the full token (including the numbers before the colon)
- Make sure there are no extra spaces
- Regenerate if still not working
Next Steps
Now that your bot is created, connect it to your Telegram channel.