The Whatsapp object containing all necessary information
A promise that resolves to a success message
This method requires a Twilio account with valid credentials (SID and Token). For enhanced security, it's strongly recommended to store these credentials using TagoIO Secrets rather than hardcoding them.
Supported media types: Images: JPG, JPEG, PNG, WEBP* Audio: OGG**, AMR, 3GP, AAC, MPEG Documents: PDF, DOC, DOCX, PPTX, XLSX Video: MP4 (with H.264 video codec and AAC audio) Contacts: vCard (.vcf) The maximum size limit is 16MB. Please note that the size limit for images is only 5 MB
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
message: "Hello from TagoIO!",
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
});
console.log(result);
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
message: "Hello from TagoIO!",
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
content_type: "image/jpeg",
attachment: {
filename: "image.jpg",
archive: "base64_encoded_image",
},
});
console.log(result);
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
content_variables: {"1":"Hello","2":"World"},
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
content_sid: environment.CONTENT_SID,
});
console.log(result);
Send Whatsapp message to a phone number using Twilio Integration
The Whatsapp object containing all necessary information
A promise that resolves to a success message
This method requires a Twilio account with valid credentials (SID and Token). For enhanced security, it's strongly recommended to store these credentials using TagoIO Secrets rather than hardcoding them.
Supported media types: Images: JPG, JPEG, PNG, WEBP* Audio: OGG**, AMR, 3GP, AAC, MPEG Documents: PDF, DOC, DOCX, PPTX, XLSX Video: MP4 (with H.264 video codec and AAC audio) Contacts: vCard (.vcf) The maximum size limit is 16MB. Please note that the size limit for images is only 5 MB
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
message: "Hello from TagoIO!",
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
});
console.log(result);
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
message: "Hello from TagoIO!",
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
content_type: "image/jpeg",
attachment: {
filename: "image.jpg",
archive: "base64_encoded_image",
},
});
console.log(result);
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
content_variables: {"1":"Hello","2":"World"},
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
content_sid: environment.CONTENT_SID,
});
console.log(result);
Send Whatsapp message to a phone number using Twilio Integration
The Whatsapp object containing all necessary information
A promise that resolves to a success message
This method requires a Twilio account with valid credentials (SID and Token). For enhanced security, it's strongly recommended to store these credentials using TagoIO Secrets rather than hardcoding them.
Supported media types: Images: JPG, JPEG, PNG, WEBP* Audio: OGG**, AMR, 3GP, AAC, MPEG Documents: PDF, DOC, DOCX, PPTX, XLSX Video: MP4 (with H.264 video codec and AAC audio) Contacts: vCard (.vcf) The maximum size limit is 16MB. Please note that the size limit for images is only 5 MB
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
message: "Hello from TagoIO!",
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
});
console.log(result);
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
message: "Hello from TagoIO!",
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
content_type: "image/jpeg",
attachment: {
filename: "image.jpg",
archive: "base64_encoded_image",
},
});
console.log(result);
const environment = Utils.envToJson(context.environment);
const twilioWhatsappService = new Services({ token: context.token }).twilio_whatsapp;
const result = await twilioWhatsappService.send({
to: "+1234567890",
content_variables: {"1":"Hello","2":"World"},
from: "+0987654321",
twilio_sid: environment.TWILIO_SID,
twilio_token: environment.TWILIO_TOKEN,
content_sid: environment.CONTENT_SID,
});
console.log(result);
Send Whatsapp message to a phone number using Twilio Integration