yeya
yeya

Reputation: 2204

WhatsApp API Webhook Not Receiving Message Webhooks - all other webhooks works well

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:

Problem Details:

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);
});

Upvotes: 2

Views: 229

Answers (1)

Sergio Gao
Sergio Gao

Reputation: 429

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"]
}

Upvotes: 1

Related Questions