Expose localhost RASA chatbot for Telegram Integration

This tutorial will show how you can expose your RASA chat bot to integrate it with Telegram.

1. Initialize a RASA project

You can simply initialize a new project.

$ rasa init --no-prompt

2. Create a Telegram Bot

Search @BotFather on telegram. Use '/newbot' to create a Telegram bot. Follow instructions until you set your bot name & get your Token for accessing Telegram's HTTP API.

3. Reserve a sub-domain specific for your project

You can reserve loclx.io subdomain or use a custom domain (explained here).

4. Expose RASA server with LocalXpose

The default port for RASA server is 5005.

If you want these ports to be exposed during boot, you can create a systemd unit file as explained here.

5. Edit your credentials.yml

Edit your credential.yml file and add your access_token , verify (your bot name) & webhook_url (replace with your domain).

Talk to your Telegram bot

Search for User 'testxyzbot' & start chatting.

This is how you can have a working Telegram bot powered by RASA NLU with LocalXpose do the connecting for you.

Last updated

Was this helpful?