Connect a bot to Telegram
APPLIES TO: SDK v4
You can configure your bot to communicate with people using the Telegram messaging app. This article describes how create a Telegram bot and connect it to your bot in the Azure portal.
Tip
For information about which features are supported on each channel, see the channels reference article.
Prerequisites
- An Azure account. If you don't already have one, create a free account before you begin.
- An existing bot published to Azure.
- A device with Telegram installed and a Telegram account.
Create a new Telegram bot with BotFather
Create a Telegram bot with BotFather before connecting your bot to Telegram.
Start a new conversation with the BotFather.
Send
/newbot
to create a new Telegram bot.When asked, enter a name for the bot.
Give the Telegram bot a unique username. Note that the bot name must end with the word "bot" (case-insensitive).
Copy and save the Telegram bot's access token for later steps.
Configure Telegram in the Azure portal
Now that you have an access token, you can configure your bot in the Azure portal to communicate with Telegram.
- Log in to the Azure portal.
- Go to your bot. Then select Channels from Settings.
- Select Telegram from the list of Available Channels.
- Enter the token you copied previously into the Access Token field and select Apply.
Your bot's now successfully configured to communicate with users in Telegram.
Additional information
For information about using Telegram-specific actions in messages, see how to Implement channel-specific functionality.