WhatsApp Cloud API webhooks are not being received by Frappe

Description

WhatsApp Cloud API webhooks are not being received by Frappe, even though manual webhook testing works perfectly. Messages sent from Frappe to WhatsApp work fine (outgoing), but incoming messages from WhatsApp are not appearing in Frappe.

Environment

  • Frappe Version: 15.95.0
  • frappe_whatsapp Version: 1.57.2
  • Hosting: Frappe Cloud (knowvantage.m.frappe.cloud)
  • WhatsApp API: Cloud API (not On-Premises)

Configuration

What Works :white_check_mark:

  1. Sending messages FROM Frappe TO WhatsApp - Works perfectly
  2. Manual webhook verification (GET request with hub.challenge) - Returns correct challenge
  3. Manual webhook POST test via browser console - Message appears in WhatsApp Message list
  4. Webhook shows as “Verified” in Meta Developer Console

What Doesn’t Work :cross_mark:

  1. Real webhooks from Meta when someone sends a WhatsApp message - Never arrive
  2. No entries in Webhook Request Log
  3. Meta shows webhook payload in their activity log, but Frappe never receives it

Steps Taken

  1. :white_check_mark: Added ignore_csrf = 1 to site config and restarted
  2. :white_check_mark: Installed frappe_whatsapp app
  3. :white_check_mark: Created WhatsApp Account with all required credentials
  4. :white_check_mark: Configured webhook in Meta with exact URL
  5. :white_check_mark: Verified webhook in Meta (green checkmark)
  6. :white_check_mark: Subscribed to “messages” field in Meta webhook configuration
  7. :white_check_mark: Tested manual webhook with browser console - Works!
  8. :cross_mark: Real webhooks from Meta - Don’t arrive

Test Results

Manual Test (Works :white_check_mark:):

fetch('https://knowvantage.m.frappe.cloud/api/method/frappe_whatsapp.utils.webhook.webhook', {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    "object": "whatsapp_business_account",
    "entry": [{
      "id": "884803370668272",
      "changes": [{
        "value": {
          "messaging_product": "whatsapp",
          "metadata": {
            "display_phone_number": "15551812714",
            "phone_number_id": "933491543183960"
          },
          "contacts": [{
            "profile": {"name": "Test"},
            "wa_id": "918851394123"
          }],
          "messages": [{
            "from": "918851394124",
            "id": "test_123",
            "timestamp": "1768410603",
            "text": {"body": "Manual test"},
            "type": "text"
          }]
        },
        "field": "messages"
      }]
    }]
  })
});

Result: Message appears in WhatsApp Message list in Frappe :white_check_mark:

Real WhatsApp Message Test (Doesn’t Work :cross_mark:):

  1. Send message from personal WhatsApp to business number
  2. Meta receives message (visible in Meta activity log)
  3. Meta should send webhook to Frappe
  4. Webhook never arrives at Frappe
  5. No entry in Webhook Request Log
  6. No message in WhatsApp Message list

Expected Behavior

When someone sends a WhatsApp message to the business number, Meta should send a webhook POST request to the configured endpoint, and the message should appear in Frappe’s WhatsApp Message list.

Actual Behavior

Meta receives the message but doesn’t send the webhook to Frappe, or sends it to wrong endpoint. No webhook requests appear in Frappe’s Webhook Request Log.

hi
did you resolve this issue? i’m facing the same issue . could you please tell me what the exact issue is and how you solved it ?

Did you check your meta configuration? Like webhook endpoint is correct or not?