Sending templates - filipporomani/whatsapp-python GitHub Wiki

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.

⚠️ **GitHub.com Fallback** ⚠️