Skip to content

Client Twilio

Keith Sterling edited this page Feb 26, 2019 · 3 revisions

Twilio, among many messaging options provides cost-effective worldwide SMS messaging platform.

For a description on how to register your bot with Twilio and obtain the necessary security tokens read the Twilio Documentation

The Twilio client operates as a RESTfl webhook server that Twilio calls whenever it receives a message. We configure these settings as follows in config.yaml

twilio:
  host: 127.0.0.1
  port: 5000
  debug: false

Twilio developer portal provides the Accoutn SID for your bot and the Authentication token. You will also need to purchase a telephone number with SMS rights, and this is also included in license.keys as follows

TWILIO_ACCOUNT_SID = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
TWILIO_AUTH_TOKEN = YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
TWILIO_FROM_NUMBER = +441315105590

To run the Facebook client, you can use the shell script in Y-Bot scripts folder

./y-bot-twillio.sh

Or you can use the command line

python3 -m programy.clients.rest.flask.twilio.client --config <PATH TO CONFIG> --cformat yaml --logging <PATH TO LOGGING>
Clone this wiki locally