How to add a Telegram Bot to the Chat API

Getting started with Telegram is easy! Follow these steps to be up and running in no time!

 

  1. All Telegram Bots are managed by the BotFather. Creating a Bot is also done by sending him commands. To get started you navigate to https://telegram.me/botfather.

  2. After starting the conversation with him you need to send him the command /newbot to get started with creating a new Bot.

  3. The next question the BotFather will ask is what the name of the Bot should be. This can be anything and will be used as a nickname for your Bot. Send the BotFather a message with the name of your new Bot. The Bot name can be changed anytime you wish.

  4. The next question is important as it will be about the username of your Bot. Your username has to end with bot or _bot and you can’t change the username of your Bot in the future. The username has to be unique as well and the BotFather will let you know if you’ve chosen an already taken username.

  5. When you have chosen the username you will be congratulated as you’ve just created your Bot! The BotFather will send you a message containing a token to access the HTTP API. You’ll need to write this one down as this, together with the username is what you’ll need to add it as a Channel to the Chat API.

  6. The last step is to add your Bot to the Chat API. Navigate to your Channels page and choose to add a new Telegram Channel. Here you’ll fill in the name you’d like to give the Channel, the Bot’s username and the Bot’s token you’ve received at Step 5.

 

Done! You’ve just created a Telegram Bot and added it to the Chat API. You are now all set to send the first message to your Telegram Bot.

Using the BotFather you can also customize your Telegram Bot. Optional commands are:

/setname - change a bot's name

/setdescription - change bot description

/setabouttext - change bot about info

/setuserpic - change bot profile photo