Rasa twilio not working


I downloaded rasa restaurant bot example from GitHub and trying to integrate with Twilio. I am following the below steps:

  1. Credentials.yml file twilio: account_sid: “ACbc2dxxxxxxxxxxxx19d54bdcd6e41186” auth_token: “e231c197493a7122d475b4xxxxxxxxxx” twilio_number: “+440123456789”
  2. python -m rasa_core.run -d models/dialogue -u models/nlu/current –port 5002 --credentials credentials.yml

I am using ngrok and gave webhook URL in Twilio. when I run rasa core I am getting credentials are required to create a TwilioClient. is there anything I need to add in the configuration?

Hm, this is strange, and doesn’t look like it’s coming from rasa, but likely from the TwilioClient. Can you post the full traceback? Also, which version of Core are you running?

Hi @erohmensing, I am also facing similar issue. I just created sample chatbot and configured Twilio keys in credentials.yml file.

Rasa Version: 2.6.2 Python: 3.7.7 OS X: Big Sur 11.4

[2021-06-03 09:08:01 +0800] [37522] [ERROR] Exception occurred while handling uri: 'http://cf1d20d1e876.ngrok.io/webhooks/twilio/webhook'
Traceback (most recent call last):
  File "/Users/chatbot/sample_bot/sample/lib/python3.7/site-packages/sanic/app.py", line 931, in handle_request
    response = await response
  File "/Users/chatbot/sample_bot/sample/lib/python3.7/site-packages/rasa/core/channels/twilio.py", line 132, in message
    out_channel = self.get_output_channel()
  File "/Users/chatbot/sample_bot/sample/lib/python3.7/site-packages/rasa/core/channels/twilio.py", line 162, in get_output_channel
    return TwilioOutput(self.account_sid, self.auth_token, self.twilio_number)
  File "/Users/chatbot/sample_bot/sample/lib/python3.7/site-packages/rasa/core/channels/twilio.py", line 31, in __init__
    super().__init__(account_sid, auth_token)
  File "/Users/chatbot/sample_bot/sample/lib/python3.7/site-packages/twilio/rest/__init__.py", line 54, in __init__
    raise TwilioException("Credentials are required to create a TwilioClient")
twilio.base.exceptions.TwilioException: Credentials are required to create a TwilioClient

I resolved this issue by setting environment variables like below.

export TWILIO_ACCOUNT_SID=ACbc2dxxxxxxxxxxxx19d54bdcd6e41186
export TWILIO_AUTH_TOKEN=e231c197493a7122d475b4xxxxxxxxxx

Thank you for your support.

i get the same problem haw can i solve this

haw can i solve this problem