Getting Credentials
You first have to create a Twilio app to get credentials. Once you have them you can add these to yourcredentials.yml.
How to get the Twilio credentials:
You need to set up a Twilio account.
- Once you have created a Twilio account, you need to create a new
project. The basic important product to select here
is
Programmable SMS. - Once you have created the project, navigate to the Dashboard of
Programmable SMSand click onGet Started. Follow the steps to connect a phone number to the project. - Now you can use the
Account SID,Auth Token, and the phone number you purchased in yourcredentials.yml. - Configure your webhook URL by navigating to
Phone Numbers in the Twilio
dashboard and selecting your phone number. Find the
Messagingsection and add your webhook URL (e.g.https://<host>:<port>/webhooks/twilio/webhook, replacing the host and port with the appropriate values from your running Rasa server) to theA MESSAGE COMES INsetting.
Connecting to WhatsApp
You can deploy a Rasa assistant to WhatsApp through Twilio. However, to do so, you have to have a WhatsApp Business profile. Associate your Whatsapp Business profile with the phone number you purchased through Twilio to access the Twilio API for WhatsApp. According to the Twilio API documentation, the phone number you use should be prefixed with whatsapp: in thecredentials.yml described below.
Running on Twilio
Add the Twilio credentials to yourcredentials.yml:
Receiving Location Data from Whatsapp with Twilio connector
This is how you can receive location data (WhatsApp Location) from a user on this channel:- Create an intent named “locationData” and define two entities and slots for Latitude and Longitude respectively.
domain.yml
- When the user sends a location message, the locationData intent will be triggered and the slots will be set from the entities. Note that you do not need to provide training data for the entities as they are handled by the channel.