Send SMS Using Twilio Connect

4/3/2025

 

Twilio allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs

Anypoint Connector for Twilio (Twilio Connector) is a cloud communications infrastructure as a service (IaaS).The Twilio platform serves APIs for text messaging, VoIP, and voice calls. Twilio Connector provides connectivity to the Twilio text messaging API

This connector provides an API for sending and receiving text messages

Prerequisites:

You should have account for Twilio

Module should be added in Anypoint Studio(Please visit to add module from exchange)

Operations Supported by Twilio Connector In Mulesoft

Send Message

Get Message

Get Media

Get Media List

Get Message List

Redact Message

Delete Media

Delete Message

Create twilio Account using below url:

https://twilio.com/try-twilio

 

Mail has been sent to registered email, Kindly verify the account

Note the Account SID and Auth Token for further use for connector configuration

Click on manage numbers and get your first twilio phone number to send message/phone calls

Congratulations message will be shown

Create a mule application in studio and configure the listener to trigger the request

Create a transform message(payload) to send message from Twilio connector

Note: From Number and To Number should be in E.164 Format

E.164 Format: E.164 is the international telephone numbering plan that ensures each device on the PSTN has globally unique number.This number allows phone calls and text messages can be correctly routed to individual phones in different countries. E.164 numbers are formatted [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits

Drag and drop Send message from mule palette and configure the username(AccountSID) and password(AuthToken)

 

 

Deploy the application and test from postman

Message Received on Phone:

 

Conclusion:

Integrating Twilio with MuleSoft for SMS delivery offers a seamless solution for real-time communication. It simplifies the process of sending personalized, automated messages across systems. By leveraging Twilio Connect in MuleSoft, businesses can enhance customer engagement and streamline communication workflows.