最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Unable to Receive Messages from WhatsApp App in Webhook despite Successful Curl Requests - Stack Overflow

programmeradmin2浏览0评论

I’ve set up a server to interact with the WhatsApp API and configured everything as per the instructions. I’ve implemented my code, and I’m able to send messages to my server via curl successfully. The server also sends automatic responses when I use curl to send messages.

However, when I try to send messages through the WhatsApp app itself (not via curl), the messages do not seem to trigger my webhook, even though I can receive messages on my mobile device from the WhatsApp API.

Has anyone encountered a similar issue or have any suggestions as to why this might be happening? I’m at a loss as to what might be blocking the WhatsApp app messages from reaching the webhook.

Any help would be greatly appreciated!

Thanks!

I have verified:

The number is correctly added to the allowed list in the WhatsApp Business API dashboard. The server can receive and process messages from curl, but I’m not seeing anything when messages come from the WhatsApp app.

I’ve set up a server to interact with the WhatsApp API and configured everything as per the instructions. I’ve implemented my code, and I’m able to send messages to my server via curl successfully. The server also sends automatic responses when I use curl to send messages.

However, when I try to send messages through the WhatsApp app itself (not via curl), the messages do not seem to trigger my webhook, even though I can receive messages on my mobile device from the WhatsApp API.

Has anyone encountered a similar issue or have any suggestions as to why this might be happening? I’m at a loss as to what might be blocking the WhatsApp app messages from reaching the webhook.

Any help would be greatly appreciated!

Thanks!

I have verified:

The number is correctly added to the allowed list in the WhatsApp Business API dashboard. The server can receive and process messages from curl, but I’m not seeing anything when messages come from the WhatsApp app.

Share Improve this question asked Mar 16 at 0:09 Nicholas TomicNicholas Tomic 11 silver badge
Add a comment  | 

1 Answer 1

Reset to default 1

Have you tried following the instructions given at https://developers.facebook/docs/graph-api/webhooks/getting-started/webhooks-for-whatsapp#subscribe ?

  1. You need to create a Meta App and subscribe to 'messages' webhook topic under WhatsApp product on the App dashboard

  2. You then need to subscribe to the WhatsApp business account using following endpoint:

    curl -X POST 'https://graph.facebook/<API_VERSION>/<WHATSAPP_BUSINESS_ACCOUNT_ID>/subscribed_apps' \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'
    
发布评论

评论列表(0)

  1. 暂无评论