Skip to main content

Twilio

Twilio powers personalized interactions and trusted global communications to connect you with customers.

Official Websitehttps://www.twilio.com/
Tagssmsphoneemail

Credential configuration

To configure this credential, you need your Twilio Account SID and the Auth Token. You can find both in the main page when you log in to Twilio.

Optionally, you can set any of the extra config parameters you can see here, in the opts object.

Here is an example of a filled credential configuration form in YepCode:

Twilio Snippets available in Editor

note

The title is the triggering text for YepCode to autocomplete the script.

Integration

New integration from credential
const twilio = yepcode.integration.twilio('credential-slug');
New integration from plain authentication data
const twilio = require('twilio')('your-account-SID', 'your-auth-token');

Send SMS Message

Send SMS message
twilio.messages
.create({
body: "SMS content",
messagingServiceSid: "messagingServiceSid",
to: "Phone number in international format",
})
.then((message) => console.log(message))
.done();

Send Whatsapp Message

Send Whatsapp message
twilio.messages
.create({
body: "Whatsapp content",
from: "whatsapp:Your twilio phone number in international format",
to: "whatsapp:Destination phone number in international format",
})
.then((message) => console.log(message))
.done();