PART 1 — CREATE YOUR BOT
Step 1: Open Telegram and find BotFather Open the Telegram app (mobile or desktop). In the search bar, type @BotFather and select the verified account (blue checkmark). BotFather is Telegram’s official bot for managing all bots.
Step 2: Start a conversation Tap Start or send the command /start. BotFather will reply with a list of available commands.
Step 3: Create a new bot Send the command: /newbot BotFather will ask you two questions in sequence:
- Display name — a friendly name shown in the chat header (e.g. My Awesome Bot). Can contain spaces.
- Username — a unique handle ending in “bot” (e.g. my_awesome_bot). No spaces, case-insensitive.
Step 4: Receive your API token After a valid username is accepted, BotFather will send you your HTTP API token in this format: 123456789:AAFxyz1234AbcDef-EXAMPLE_TOKEN_abcde ⚠ Copy and store this token securely. Anyone with this token can control your bot. Never commit it to a public repo or hardcode it in source.
PART 2 — OPTIONAL CONFIGURATION
Step 5: Set a description and profile photo
- /setdescription — shown on the bot’s profile page
- /setabouttext — shown below the bot name in chats
- /setuserpic — upload a profile photo for the bot
Step 6: Add bot commands (slash menu) Send /setcommands to define commands that appear when users type / in the chat. Enter them in this format: start – Welcome and intro help – Show help message
Step 7: Configure privacy mode (for group bots) By default, bots in groups only receive messages that start with / or mention the bot. To receive all messages, send /setprivacy and choose Disable. 💡 For personal or direct-chat bots, privacy mode doesn’t apply — skip this step.
PART 3 — TEST IT
Step 8: Verify the token works Test your token by calling the Telegram Bot API in a browser or with url: https://api.telegram.org/bot<YOUR_TOKEN>/getMe A successful response returns a JSON object with your bot’s id, username, and first_name.
Step 9: Revoke or regenerate the token (if needed) If your token is ever exposed, immediately go back to BotFather and send /revoke. Select your bot and BotFather will issue a new token. The old token is instantly invalidated.
