2

I'm experiencing an issue with WhatsApp webhook messages events not being triggered, despite other webhook tests working correctly (like flows \ security \ account_alerts.

Environment:

  • Using WhatsApp Business API
  • Tested on Facebook's webhook test page
  • Facebook app in Live mode

Problem Details:

  • All webhook tests received successfully EXCEPT message webhooks
  • No webhooks are triggered when:
    1. Sending messages from the Facebook webhook test page
    2. Sending messages directly to the registered WhatsApp number

Code/Configuration Attempts:

// Simplified webhook handler (example)
app.post('/webhook', (req, res) => {
  const body = req.body;
  console.log('Webhook received:', body);
  
  if (body.entry && body.entry[0].changes) {
    // Webhook processing logic
  }
  
  res.sendStatus(200);
});

1 Answer 1

3

You have subscribed to get messages? You can allow in panel if it's the first WhatsApp Number: Signed for receive webhook messages

Or you need to use API if was not the first added number: POST to https://graph.facebook.com/v21.0/{{PHONE_NUMBER_ID}}/subscribed_apps with your bearer and this payload:

{
    "data": ["messages"]
}
Sign up to request clarification or add additional context in comments.

3 Comments

Wow! I could not guess that clicking subscribe is valid only for the first number! And I see no reason for the test to work only if you subscribes (all the other test buttons works without subscription) Thanks a lot
The Meta API is just bad. Your welcome
Thanks, just one correction - I had to use <WhatsApp Business Account ID> in the API.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.