I’ve configured Telegram connector precisely following the instruction in the docs, but the bot does not respond to any messages. I’ve seen some users put --enable-api key to the rasa run command. Could it be it or some other thing I am missing?
Hi @BunnyNoBugs,
I am pretty unexperienced with RASA and therefore I simply followed the instructions provided int the Udemy RASA Developer course. Maybe it helps you? The steps were:
Install the desktop app of Telegram and follow the instructions provided by Rasa here
Add the Telegram credentials to your credentials.yml (see description in link above)
start the RASA server rasa run when rasa is up and running, then
start ngrok in another terminal window ngrok http 5005
add the ngrok-URL to your credentials.yml Telegram webhook URL and save the file
restart the RASA server so changes in the credentials.yml get picked up with /stop or CTR+C and rasa run
make sure your action server is running
Futhermore, I added the intent start to my domain.yml, in the nlu.yml I provided the example
- intent: start
examples: |
- /start
- start
and in the rule in rules.yml:
- rule: Greet the user in Telegram
steps:
- intent: start
- action: utter_greet
can you share something regarding this, and as Violetta suggested first try and confirm with us that are you able to chat with the bot, yes then Telegram is working fine and then we will investigate the proxy issue. Good Luck
My setup is following: I am working on a server that doesn’t have public ports open. To have a public access to the telegram endpoint I use a proxy that redirects traffic from an open URL to port 8443 on my machine. The proxy is working fine – I have checked it with a simple uvicorn app.
I do rasa run -vv. In the logs I see this (I’ve hidden my bot’s token and my proxy address): https://api.telegram.org:443"GET /bot<MY_TOKEN>/setWebhook?url=<MY_PROXY>%2Fwebhooks%2Ftelegram%2Fwebhook HTTP/1.1" 200 64. This might mean that the connection is OK.
However, the bot doesn’t respond to the messages and in the logs I don’t get any confirmation that the messages were received.
@BunnyNoBugs I’m so sorry, I have not much experience in implementing rasa with Telegram, else I have provided the solution, I agree that I forgot to reply to your post, please accept my apologies. Is your issue still persist?
Thanks for your answer! Yes, the issue still persists and I’ve checked it in different setups.
I’ve tried ngrok instead of proxy and the behaviour was the same as I described earlier. Plus, I’ve checked port 443 instead of 8443 I was using with no result either.
I have the same issue with rasa telegram integration. I’ve checked via telegram API if the webhook is set after start of rasa server. But the result was that the webhook was not set.
After the manual set via REST with http://localhost:5005/webhooks/telegram/set_webhook the integration works.
I’m using Rasa Version 3.3.0 and Python Version 3.9.