Skip to main content

Prerequisites

  1. Go to the Meta Developer Portal and create a developer account.
  2. Create a new Business app at the Apps Dashboard.
  3. Add the WhatsApp product to your app from the app dashboard.
  4. In WhatsApp > API Setup, note your Phone Number ID and generate an Access Token.
For first-time outreach to a user, you must use pre-approved message templates. Test messages can only be sent to numbers registered in your test environment.

Example

The following agent sends a template message via WhatsApp:
cookbook/91_tools/whatsapp_tools.py

Run the Example

For more examples, see the WhatsApp cookbooks.