createWhatsAppAuthenticationTemplate
Creates a new WhatsApp authentication content template.
WhatsApp authentication templates are used to deliver one-time passwords with a copy code button. The button text and code expiration can be customised.
-
See:
-
Example:
const actions = [
{
type: connectors.verjio.twilio.content.actionType.COPY_CODE,
copy_code_text: 'Copy code'
}
];
// Set the one-time code to expire after 15 minutes
const sid = connectors.verjio.twilio.content.createWhatsAppAuthenticationTemplate(
name,
actions,
15
);
createWhatsAppCardTemplate
Creates a new WhatsApp card content template.
WhatsApp card templates are made up of either header text or media, followed by a message and an optional footer. WhatsApp cards also include one or more action buttons as defined in the actions array.
-
See:
-
Example:
const actions = [
{
type: connectors.verjio.twilio.content.actionType.PHONE_NUMBER,
title: 'Call us to book',
phone: '+441234567890'
}
];
const sid = connectors.verjio.twilio.content.createWhatsAppCardTemplate(
'happy_birthday_offer_wa',
'Happy birthday from Sandy\'s! Why not celebrate with some free ice cream?',
actions,
null, // No header, as we are using media
'https://sandy.verj.cloud/images/birthday-cake.png'
);