Skip to Content
Track your Telegram conversions with Meta Ads - Get started in minutes!
Telegram SetupCreate a Bot

Create a Telegram Bot

This guide walks you through creating a Telegram bot using BotFather. Takes about 2 minutes.

Step 1: Open BotFather

  1. Open Telegram (app or web)
  2. Search for @BotFather
  3. 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

  1. Send the command /newbot
  2. BotFather will ask for a name for your bot
  3. Enter a friendly name like “My Channel Tracker”

Step 3: Choose a Username

  1. BotFather asks for a username
  2. Must end in “bot” (e.g., mychanneltracker_bot)
  3. Must be unique across Telegram

Tips for usernames:

  • Keep it short and memorable
  • Use your brand name + _bot suffix
  • 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:ABCdefGHIjklMNOpqrsTUVwxyz123456789

Keep this token secret! Anyone with the token can control your bot.

Step 5: Add Token to AdTarget

  1. Go to your AdTarget dashboard 
  2. Open the site you want to track
  3. Go to Settings and select the Bots tab
  4. Click Add bot
  5. Paste your bot token into the input field

AdTarget will automatically verify the token, connect your bot, and register its webhook. You’ll see a success notification with your bot’s username once it’s connected.


Bot Settings (Optional)

You can customize your bot through BotFather:

Set a Profile Picture

  1. Send /setuserpic to BotFather
  2. Select your bot
  3. Upload an image (ideally your brand logo)

Set a Description

  1. Send /setdescription to BotFather
  2. Select your bot
  3. Enter a description users see when they start the bot

A Note on Privacy Mode

You do not need to change the bot’s privacy mode. AdTarget configures the webhook to listen for chat_member and my_chat_member events, which Telegram delivers regardless of the privacy setting. The privacy setting only controls whether a bot receives regular text messages in groups — it has no effect on channel join tracking.


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:

  1. Send /revoke to BotFather
  2. Select your bot
  3. BotFather generates a new token
  4. Delete the old bot in AdTarget and add the new token via Settings → Bots → Add bot

Deleting a bot in AdTarget permanently deletes all associated data — channels, invite links, conversions, and site-channel assignments. This cannot be undone. Export or back up any data you need before deleting the bot.


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?

  • “This bot is already connected to another account” — Bot tokens are exclusive per AdTarget account. If you previously used this token on a different account, remove it there first.
  • “Maximum bots reached” — Each AdTarget account can have up to 20 bots. Delete an unused bot before adding a new one.
  • No response when pasting the token — Make sure you copied the full token including the numbers before the colon (e.g., 1234567890:ABC...) with no extra spaces. The auto-validation only triggers when the format matches.
  • If the token is valid but still fails, try regenerating it with /revoke in BotFather and paste the new one.

Next Steps

Now that your bot is created, connect it to your Telegram channel.

Last updated on

Create a Telegram Bot | AdTarget Docs