How to use IBM App Connect with Twilio
Twilio is a cloud communication platform provider that allows communication to be established. Twilio can be used to make voice and video calls, send messages, send emails, and even connect to IoT devices.
- App Connect Enterprise as a Service connector
Local connector in containers (Continuous Delivery release) 12.0.8.0-r3 or later
-
Local connector in containers (Long Term Support Cycle-2 release)
Connecting to Twilio
Complete the connection fields that you see in the App Connect Designer Catalog page or flow editor. If necessary, work with your Twilio administrator to obtain these values.
Connection field | Description |
---|---|
Account SID | Specify the account SID. Get the account SID and auth token from the Admin Console of your Twilio account. |
Auth token | Specify the auth token for the account SID as the password. Get the account SID and auth token from the Admin Console of your Twilio account. |
API URL | Specify the Twilio REST API URL, for example,
https://api.twilio.com/2010-04-01/Accounts/{{account_sid}} .
|
To obtain the connection values (Account SID and Auth token) for Twilio and to connect to App Connect, see Obtaining connection values for Twilio.
To connect to a Twilio endpoint from the App Connect Designer Catalog page for the first time, expand Twilio, then click Connect. For more information, see Managing accounts.
Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Applications and APIs page, select the account, open its options menu (⋮), then click Rename Account.
General considerations
Before you use App Connect Designer with Twilio, take note of the following considerations:
- You can use WhatsApp on Twilio to send images, videos, text, and PDF files to create rich contextual conversations with your WhatsApp users. For more information, see Getting Started with WhatsApp and Guided Signup on the Twilio Docs page.
- The Twilio Markup Language, also known as TwiML, is an XML-based language that tells Twilio how to handle different events like incoming and outgoing calls, SMS messages, and MMS messages. TwiML is used when developing a Twilio application to communicate your wanted actions to Twilio. For more information, see Twilio Markup Language (TwiML) on the Twilio Docs page.
- (General consideration) You can see lists of the trigger events and
actions that are available on the Applications and APIs page of the App Connect Designer.
For some applications, the events and actions depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.
- (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
Events and actions
Twilio events
These events are for changes in this application that trigger a flow to start completing the actions in the flow.
Twilio actions
Your flow completes these actions on this application.
Object | Action | Description |
---|---|---|
Calls | Retrieve call details | Retrieves the call details |
Make a voice call | Makes a voice call | |
Retrieve call details by ID | Retrieves the call details by ID | |
Update call details | Updates the call details | |
Incoming phone numbers | Retrieve incoming phone numbers | Retrieves the incoming phone numbers |
Message services | Retrieve message services | Retrieves the message services |
Messages | Retrieve messages | Retrieves the messages |
Cancel a scheduled message | Cancels a scheduled message | |
Redact message | Redacts the message | |
Retrieve message by ID | Retrieves the message by ID | |
Send message by phone number | Sends a message by using phone number | |
Send message via messaging service | Sends message by using the messaging service |
Examples
![Dashboard tile for a template that uses Twilio Dashboard tile for a template that uses Twilio](../files/twilio_tile3.png)
![Dashboard tile for a template that uses Twilio Dashboard tile for a template that uses Twilio](../files/twilio_tile.png)
![Dashboard tile for a template that uses Twilio Dashboard tile for a template that uses Twilio](../files/twilio_tile2.png)
Use templates to quickly create flows for Twilio
Learn how to use App Connect templates to quickly create flows that complete actions on Twilio. For example, open the Templates gallery, and then search for Twilio.
![Twilio flow in detailed view Twilio flow in detailed view](../files/twilio_detailed_template.png)
Use IBM App Connect to build flows that integrate with Twilio.
Read the blog in the IBM Community to learn how to notify users via phone call or text or WhatsApp message using Twilio whenever an incident is created in ServiceNow. Click Read the blog to go to the blog.