'm currently working with the WhatsApp Business API and facing an issue specifically with the "messages" webhook. For some reason, this webhook isn't being triggered, even when I test it manually from the WhatsApp Business dashboard.
Here are the details:
All other webhooks (e.g., status, message_template, etc.) are working perfectly fine. I've tried reconfiguring the webhook URL multiple times. I switched the app back to development mode to see if that would fix it, but no luck. Has anyone encountered a similar issue or have any ideas on how to resolve this?
Additional Information:
I've verified that the server is publicly accessible and can receive POST requests. There are no errors or logs indicating any incoming request for the "messages" webhook on my server. Any help or suggestions would be greatly appreciated!
I just fixed the exact same issue, you need to subscribe your WhatsApp Business Account to your app using the following endpoint:
curl -X POST \
'https://graph.facebook.com/v21.0/WHATSAPP_BUSINESS_ACCOUNT_ID/subscribed_apps' \
-H 'Authorization: Bearer ACCESS_TOKEN'
This should give you the following response:
{
"success": true
}
Then you can confirm the subscription by calling the same endpoint with GET:
curl -X GET \
'https://graph.facebook.com/v21.0/WHATSAPP_BUSINESS_ACCOUNT_ID/subscribed_apps' \
-H 'Authorization: Bearer ACCESS_TOKEN'
Which should look like this:
{
"data": [
{
"whatsapp_business_api_data": {
"category": "Your App Category",
"link": "https://www.facebook.com/games/?app_id=1234",
"name": "Your App Name",
"id": "1234"
}
}
]
}
You can find more info here: https://developers.facebook.com/docs/whatsapp/solution-providers/get-started-for-solution-partners#subscribe-waba