To add Telegram as a channel to your Kore.ai bot, you will need to create a Bot in Telegram platform. Adding the Telegram channel to your Kore.ai Bot allows end users for your bot to interact with your bot using their Telegram account.To add the Telegram channel to your Bot, you will need to:
- Add BotFather as a Contact on Telegram- To enable Telegram channel to your bot, you need to login to Telegram and add BotFather as a contact to create a new bot on Telegram.
- Create a Bot in Telegram– To setup Telegram as a channel, you need to first create a Bot in Telegram platform using it’s default built-in bot called @BotFather. Initially, to enable Telegram channel, you must create and register for a developer account in the Telegram portal.
- Get Access Token- You will be provided an access token as a part of bot creation that you will need to reserve for channel configuration.
- Enable Channel- After entering the configuration data in Bot Builder, you need to enable the channel.
To add the Telegram channel
- In the Bots section of the Bot Builder, click the Bot that you want to add the Telegram channel to.
- On the Channels tab,click the Telegram icon. The Telegram Channel page gets displayed.
- In a new browser, Login to Telegram and search for @BotFather from the Search option as shown below.
- Select @BotFather bot and click on START button. If @BotFather is already part of your contacts, you may proceed to the next step directly.
- Navigate to the chat section, type /newbot in the message box and send.
- On sending the /newbot message, BotFather will ask you to enter a Name for the new bot to be created. Preferably, give the same name as that of the Kore bot for which the channel is being enabled.
- After providing the name, BotFather will ask for the Username for the new bot to be created. Provide any name that ends with bot. E.g. sample_bot or SampleBot.
- After providing the username, BotFather will show a confirmation message and access token.Reserve the access token to enter in the Configurations tab of the Telegram Channel page.
- Navigate to the Configurations tab of Telegram Channel page, enter the Bot Name of your Telegram bot in the Bot Name field.
- Enter the Access Token that was displayed as a part of bot creation.
- Select Yes and then click Save to enable the Telegram Channel for your bot.
Editing the Telegram Channel
To edit the Telegram channel, hover your mouse over the channel and click to modify. You can make necessary updates to your channel configurations and save them. You may also disable or delete the channel information by clicking the Settings icon.
Select one of the following commands to modify the channel:
- Disable/Enable – Click Disable to temporarily disable use of the Telegram channel for your Bot.To enable use of the Telegram channel, Click Enable.
- Delete – Click Delete, and then click OK in the Delete Confirmation dialog to permanently delete the Bot channel configuration.