twilio/call-to-action
Twilio/call-to-action
buttons let recipients tap to trigger actions such as launching a website or making a phone call.
Call-to-action buttons can only be sent via WhatsApp as approved templates.
If you are using a URL button and want to submit the template for WhatsApp approval, the URL must resolve to a publicly accessible website. If there is a variable, a valid path sample should be included in the variables array. The combined URL should resolve to a publicly accessible website.
Example:
"url": ["https://www.twilio.com/{{1}}"]
would include a path sample in the variables definition."variables": {"1": "docs"}
Twilio/call-to-action templates can be sent via Whatsapp for out of session messages with variables. If the template's body starts or ends with a variable or has two variables next to each other, the template will not be approved by Whatsapp without a sample variable. For additional information about variables see Using Variables with Content Templates.
Supported Channels
WhatsApp, Facebook Messenger
Message Preview
Data Parameters
body:
Type - string Required - yes Variable Support - yes Description - The text of the message you want to send. This is included as a regular text message.
|
actions: Type - array[actions] Required - yes Variable Support - See Common Components: Actions definition Description - Buttons that recipients can tap on to act on the message:
|
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.