How to create a Telegram bot
This guide will walk you through the process of creating a Telegram bot and obtaining your bot token. No coding experience required!
Prerequisites
A Telegram account
A smartphone or computer with Telegram installed
Step 1: Start a Chat with BotFather

Open Telegram
In the search bar at the top, type:
@BotFatherClick on the verified BotFather account (it has a blue checkmark)
Click the "Start" button or send
/start
Step 2: Create a New Bot

Send the command
/newbotto BotFatherBotFather will ask you to choose a name for your bot
This is the display name that appears in conversations
Example: "My Awesome Bot"
After setting the name, BotFather will ask for a username for your bot
Must end in 'bot' (e.g.,
my_awesome_botorMyAwesomeBot)Must be unique across all of Telegram
Can only contain letters, numbers, and underscores
Step 3: Get Your Bot Token

If everything is successful, BotFather will respond with a message containing:
A congratulations message
Your bot's link (t.me/YourBotsUsername)
Your bot token (Looks like:
123456789:ABCdefGHIjklmNOPQrstUVwxyz)
Important: Keep your token secret! It's like a password for your bot
Never share it publicly
Store it somewhere safe
If compromised, you can get a new one using
/tokencommand
Step 4: Basic Bot Management Commands
You can use these commands with BotFather to manage your bot:
/mybots- Lists all your bots and provides management options/setname- Change your bot's name/setdescription- Change your bot's description/setabouttext- Change the bot's about info/setuserpic- Change your bot's profile picture/setcommands- Set up command suggestions for your bot
What's Next?
Your bot is now created and ready to be programmed
The bot token you received will be used in your bot's code to authenticate with Telegram's API
Keep your bot token secure - you'll need it for development
Troubleshooting Tips
If the username is taken, try another one
If you lost your token, use
/tokencommand with BotFather to get itIf your bot is compromised, use
/revoketo revoke the old token and get a new one
Safety Notes
Never share your bot token publicly
Don't commit your token to public repositories
If you accidentally expose your token, revoke it immediately using BotFather
Last updated