snippets_js
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();