Event Target for Twilio
Consult the Secrets guide for more information about how to add the Twilio Account SID and API Access Token as secrets.
Deploying an Instance of the Target
Open the Bridge creation screen and add a Target of type
In the Target creation form, give a name to the event Target and add the following information:
- Default source phone number (Optional): Sender's phone number, usually configured to the phone number purchased at Twilio.
- Default destination (Optional): Phone number to send messages to by default.
- SID Secret: Reference to a TriggerMesh secret containing the SID of the Twilio account.
- Token Secret: Reference to a TriggerMesh secret containing an API Access token for authenticating requests against the Twilio API.
Both the Default source phone number and Default destination configurations may be overridden by any CloudEvent message received by the Target.
For more information about using Twilio, please refer to the Twilio documentation.
After submitting the Bridge, and allowing for some configuration time, a green check mark on the main Bridges page indicates that the Bridge was successfully created.
A Twilio event Target accepts the following CloudEvent types:
Events of this type intend to send a SMS message via Twilio.
This type expects a JSON payload with the following properties:
|message||string||Text to be sent in the body of the SMS message.|
|media_urls||string||Array of URLs pointing to JPEG, GIF or PNG resources.|
|from||string||Phone number sourcing the communication. Takes precedence over the value from the Twilio Target spec.|
|to||string||Phone number of the destination. Takes precedence over the value from the Twilio Target spec.|