credentials.yml.
Getting Credentials
How to get the Telegram credentials: You need to set up a Telegram bot.- To create the bot, go to Bot Father,
enter
/newbotand follow the instructions. The URL that Telegram should send messages to will look likehttp://<host>:<port>/webhooks/telegram/webhook, replacing the host and port with the appropriate values from your running Rasa server. - At the end you should get your
access_tokenand the username you set will be yourverify. - If you want to use your bot in a group setting, it’s advisable to
turn on group privacy mode by entering
/setprivacy. Then the bot will only listen when a user’s message starts with/bot.
Running on Telegram
Add the Telegram credentials to yourcredentials.yml:
Handling /start messageAt the beginning of a conversation, the user will press the ‘Start’ button in Telegram.
This will trigger a message with the content /start to be sent.
Make sure your bot can handle this intro message by designing a specific intent in the nlu training data file.
Then add this
start intent to the domain alongside a story or rule to handle it.Supported Response Attachments
In addition to standardtext: responses, this channel also supports the following components from the Telegram API:
buttonarguments:- button_type: inline | vertical | reply
customarguments:- photo
- audio
- document
- sticker
- video
- video_note
- animation
- voice
- media
- latitude, longitude (location)
- latitude, longitude, title, address (venue)
- phone_number
- game_short_name
- action