Websites use the Telegram API

ChatBots for Telegram

One of the great advantages of chatbots is that, unlike applications, they do not need to be downloaded, do not need to be updated, and do not take up space on the phone memory.

On the other hand, several bots can be integrated in the same chat. This way we avoid jumping from one app to the next depending on what we need at each moment.

The main consequences? More pleasant user experience and faster and easier interactions with customer service.

How to create a bot for Telegram

The important things first. You need to sign up for Telegram (obviously). I recommend using the Telegram web client to test the basics.

Open the Telegram, search for @BotFather and start chatting. Send the command / newbot and follow the instructions. After completing the first steps, you will receive:

  • Your own mark
  • Telegram api URL - api.telegram.org/
  • Link to documentation

At the moment the bot is 100% passive.

Integration with Chatcompose

You will need a ChatCompose account to continue. You can register here.

After registration, go to the Install> Integrations section. There you will see the possibility of integrating yourself into Telegram.

You will see the following:

Enter and save the token generated with BotFather.

The token should look something like 000000: AAAAAAAAAAAAA, with zeros being numbers and the ace being letters.

After saving, we register our bot route with Telegram. Copy the route from our platform and paste it into this URL along with your token.

api.telegram.org/bot/setWebHook?url=

The url should look something like this:

api.telegram.org/bot000000:AAAAAAAAAAAAA/setWebHook?url=https://admin.chatcompose.com/telegram/yourbot

Navigate to this route. The response should return:

{"ok": true, "result": true, "description": "Webhook was set"}

To test whether the configuration was successful, you can navigate to:

api.telegram.org/bot/getWebhookInfo

The call should return the Chatcompose URL that you just configured.

If you have not yet entered the token generated with BotFather into ChatCompose, do so now.

Next Steps

Your bot should be installed and running on Telegram. Don't forget to configure your automatic replies in ChatCompose in the "Database" section.

Click on the address of your bot generated by BotFather (t.me/nameofyour) and start interacting.