Skip to main content

Twilio

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

Official Websitehttps://www.twilio.com/
Version3.83.1
Tagssms, phone, email

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 params you can see here, in the opts object.

Here you have 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();