In-App Signups areDocumentation 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.
wa.me/<phone>/signup/<id> deep links that let users opt in to your WhatsApp messaging channel directly from their app. When a user taps the link, WhatsApp opens and displays your custom consent screen before the subscription is confirmed. django-meta-whatsapp manages the full lifecycle — creation, delivery of confirmation messages, promo codes, and automatic contact labelling — via the Meta Graph API.
WhatsAppSignup model fields
| Field | Type | Description |
|---|---|---|
account | FK → WhatsAppAccount | The WhatsApp account that owns this signup link |
signup_id | CharField (unique) | ID returned by Meta after creation — immutable |
display_name | CharField | Internal label for your reference; not shown to users |
signup_message | TextField | Pre-consent screen text shown to the user inside WhatsApp |
confirmation_message | TextField | Message sent to the user automatically after they subscribe. Use {{promo_code}} as a placeholder |
privacy_policy_url | URLField | Link to your privacy policy — immutable after creation on Meta |
website_url | URLField | Optional website link displayed alongside the signup |
promo_code | CharField | Alphanumeric code that replaces {{promo_code}} in the confirmation message |
status | CharField | ACTIVE or DISABLED |
auto_add_to_label | FK → WhatsAppLabel | Label automatically assigned to new subscribers |
subscriber_count | PositiveIntegerField | Running total updated from Meta webhook events |
tos_accepted | BooleanField | True once Meta’s Terms of Service have been accepted on first creation |
created_at / updated_at | DateTimeField | Record timestamps |
Creating a signup link
Via the dashboard: go to/whatsapp/signups/add/ and fill in the required fields: display_name, signup_message, confirmation_message, and privacy_policy_url. On save, SignupCreateView calls create_signup() and stores the returned signup_id locally.
Via Python:
create_signup POSTs to /{waba_id}/signups on the Meta Graph API and returns the raw response dict. The signup_id field on the local WhatsAppSignup record is set to result["id"].
Generating the deep link
Use theget_deep_link method on a WhatsAppSignup instance to build the shareable URL for any phone number:
+ from the phone number automatically. You can embed this URL in your website, mobile app, or email campaigns.
Auto-labeling subscribers
Setauto_add_to_label to any WhatsAppLabel when creating or editing a signup link. When the Meta webhook fires a subscription event for this signup, the webhook handler:
- Creates or retrieves the
WhatsAppContactfor the subscriber’s phone number - Adds the
auto_add_to_labellabel to the contact’slabelsManyToMany - Sets
contact.subscribed_via_signupandcontact.subscribed_at
Updating and disabling
Meta restricts which fields can be changed after a signup link is created. Onlypromo_code and confirmation_message are mutable.
Update via the dashboard: /whatsapp/signups/<pk>/edit/ exposes only those two fields plus auto_add_to_label (a local-only field).
Update via Python:
/whatsapp/signups/<pk>/disable/ from the dashboard. The local status is set to "DISABLED" and the link is deactivated on Meta. Disabled links cannot be re-enabled.
Webhook events
When a user subscribes via a signup link, Meta sends a webhook event withfield = "in_app_signup". The WebhookView._process() handler:
- Parses the event and extracts the subscriber’s phone number and the
signup_id - Calls
WhatsAppContact.objects.get_or_create(phone=...)to upsert the contact record - Sets
subscribed_via_signupandsubscribed_aton the contact - Increments
WhatsAppSignup.subscriber_count - Applies
auto_add_to_labelif configured - Fires the
whatsapp_user_subscribedDjango signal so your project code can react (e.g. send a welcome flow, trigger a CRM sync)
A
WhatsAppAccount with a waba_id configured is required to create In-App Signups. The WABA ID must be set either on the account record (account.waba_id) or in WHATSAPP['WABA_ID'] in Django settings. Without it, create_signup will raise a ValueError.