How to create a Telegram Bot

For many projects with ESP32, ESP8266, Raspberry Pi we will need to know how to create a telegram bot. For connecting the above development boards or single-board computers to the telegram bot using the telegram API libraries we need mandatory information like telegram bot token, telegram user ID, etc… for authentication and security purposes.

So in this tutorial, we are going to cover all about telegram bots. Like how to create, edit, delete, find token of the existing bot, how to change the token, etc…


What is a Telegram Bot?

Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands, and inline requests. We can control our bots using HTTPS requests to Telegram Bot API.

Read mode on telegram bots from their official documentation https://core.telegram.org/bots

How to create a Telegram Bot

Open Telegram messenger, sign in to your account or create a new one.

Step 1. Search for @Botfather in the search tab and choose this bot.

How to create a Telegram Bot

Note, official Telegram bots will have a blue checkmark beside their name

Click “Start” to activate BotFather bot.

How to create a Telegram Bot

In response, you receive a list of commands to manage bots.

Step 2. Choose or type the /newbot command and send it.

How to create a Telegram Bot

Step 3. Choose a name for your bot – This name is publicly visible.

How to create a Telegram Bot

Step 4: Choose a username for your bot — the bot can be found by its username in searches. The username must be unique and end with the word “bot.”

How to create a Telegram Bot

After you choose a suitable name for your bot, the bot will be created and You will receive a message with a link to your bot like t.me/bot_username along with the token key.

How to create a Telegram Bot


How to delete a Telegram Bot

For delete a bot you can follow these steps

  • Go to @botFather
  • Send command /deletebot
  • It will promte you all the bots you own, select the one you want to delete
  • Then Send ‘Yes, I am totally sure.’ to confirm you really want to delete this bot.
  • Done, your bot is deleted

How to find the token of existing bots

  • Go to @botFather
  • Send command /token
  • It will promte you all the bots you own, select the one you want to find the token
  • Then the token will be displayed.

Projects using Telegram Bots

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top