Skip to content
Filippo Romani edited this page Sep 13, 2024 · 2 revisions

A Template messages can either be:

  1. Text template
  2. Media based template
  3. Interactive template

You can customize the template message by passing a dictionary of components.

IMPORTANT: components are also known as variable parameters (like {{0}} or {{1}}) which are used to include variables into a message. You can find the available components in the documentation. https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates

>>> messenger.send_template("hello_world", "255757xxxxxx", components=[], lang="en_US", sender=0,)

lang is optional but required when sending templates in other languages.

Clone this wiki locally