All configuration forDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rahul-baberwal/django-meta-whatsapp/llms.txt
Use this file to discover all available pages before exploring further.
django-meta-whatsapp lives in a single WHATSAPP dictionary in your Django settings.py. There is one additional top-level setting (WHATSAPP_USE_CELERY) that sits outside the dict. The snippet below shows every supported option with inline comments — detailed explanations for each follow.
Complete settings reference
settings.py
Settings parameters
Required
The permanent system-user access token generated in Meta Business Suite. This is not a short-lived user token. Scopes required:
whatsapp_business_messaging, whatsapp_business_management.The Phone Number ID associated with your WhatsApp Business number. Found in the Meta developer dashboard under your app’s WhatsApp product section.
Any secure random string of your choosing. Meta sends this value back when verifying the webhook endpoint URL — your endpoint checks it to confirm the request is genuine. Generate one with
python -c "import secrets; print(secrets.token_hex(32))".Optional — WABA ID
Your WhatsApp Business Account (WABA) ID. Required for template sync (
sync_templates_from_meta), creating In-App Signups, and pushing templates to Meta. Found in the Meta Business Suite under Business Settings → WhatsApp Accounts.Optional — UI Customisation
The display name shown in the dashboard header and browser title bar. Customise it to match your brand, e.g.
"Acme Support Hub".A fully-qualified URL to a logo image (PNG or SVG recommended) that appears in the dashboard navigation. If omitted, no logo is shown.
The URL to redirect unauthenticated users to when they try to access any dashboard view. Defaults to Django’s standard login URL. Set to
"/admin/login/" during development for convenience.Optional — Audience Providers
The attribute name on objects returned by your audience provider queryset that holds the phone number. The package reads
getattr(obj, PHONE_FIELD) for each row.The attribute name on objects returned by your audience provider queryset that holds the display name. Used when building campaign recipient lists.
A dictionary mapping human-readable audience names to dotted Python import paths of callables that return a queryset. Each name appears as an option in the campaign creation form’s audience dropdown. See Audience Providers below for examples.
Optional — Contact Filter Presets
Named filter presets shown as a dropdown in the campaign creation form. Each value is a JSON-encoded string of Django ORM filter kwargs applied to the
WhatsAppContact queryset. See Contact Filter Presets below.Optional — Custom Campaign Resolver
Dotted path to a Python callable that takes a
WhatsAppCampaign instance and returns a list of recipient dicts: [{"phone": "...", "name": "...", "params": {...}}, ...]. When set, this resolver takes full precedence over the built-in AUDIENCES, CONTACT_FILTERS, and CSV audience resolution logic.Optional — Celery integration
Top-level Django setting (place it outside the When
WHATSAPP dict). When True, campaign execution is dispatched asynchronously via Celery using the run_campaign_task task. Requires the celery optional extra:settings.py
False (default), campaigns run synchronously in the web process — fine for development or small lists.Audience Providers
TheAUDIENCES dict maps display names to Python callables that return Django querysets. At campaign send time the package imports and calls each function, then reads PHONE_FIELD and NAME_FIELD off each returned object to build the recipient list.
myapp/audiences.py
settings.py
"All Users", "VIP Customers") appear verbatim in the campaign form’s Audience dropdown.
Contact Filter Presets
CONTACT_FILTERS provides named, one-click audience filters that are applied to the built-in WhatsAppContact model when a campaign uses the "contacts" audience type. Each value is a JSON-encoded string representing standard Django ORM filter kwargs.
settings.py
Multi-Account Configuration
For projects that manage more than one WhatsApp Business number, credentials are stored inWhatsAppAccount model records rather than (or in addition to) the global WHATSAPP settings dict.
Accounts are created and managed entirely through the dashboard UI at:
ACCESS_TOKEN, PHONE_NUMBER_ID, and WABA_ID. When sending messages or running campaigns, pass the account instance explicitly:
WHATSAPP settings dict acts as a fallback when no account is passed. You can designate one account as the project-wide default from the dashboard via Settings → Accounts → Set as Global.
For a full walkthrough of multi-account patterns, see Multi-Account Support.