1

I am trying to create a connection between our WhatsApp Business account and our website where we gather all messages sent to our business on different channels (through our own app, text, WhatsApp, ...).

I've followed this tutorial (https://developers.facebook.com/docs/whatsapp/cloud-api/get-started) and have everything set up: our WhatsApp Business is working correctly, I've added a Meta App and I've set up the webhooks with a connection to my node.js backend. When I click Test next to the "Messaging" webhook, I receive the message on my node.js backend and website. So I know this side is working as it should.

I've then used the Graph API to subscribe my Meta app to the messages with the business id of the WhatsApp with the correct permissions. When checking the subscribed apps with the {business_id}/subscribed_apps endpoint, I can see my Meta app. So I believe everything is set up correctly. My Meta app is also set to "production".

However, when I try to send a message with my personal WhatsApp to my business WhatsApp, I receive nothing on the webhook. I checked the logs on my server and nothing is being received, so I know it's not an issue in my node.js backend.

Is there something else I need to do to make this work? Does the Meta app need to be verified to use the webhook in production? If so, how can I do this? The guide for verification says I need a platform and login insctructions, but the Meta app is really only a webhook without an interface.

Thanks in advance.

2
  • If you are receiving the sent messages status notification then you should get received message notifications as well, I guess you have some issue in your webhook endpoint code, can you show that code?
    – turivishal
    Commented Nov 30, 2022 at 10:50
  • Same issue here. Have you solved your issue @Pie? I wonder whether it might not come to subscribing individually to messageson subscribed_appsendpoint but could not find a relevant documentation about the exact query string.
    – redvivi
    Commented Dec 6, 2023 at 17:56

2 Answers 2

1

The issue may happen when you use the token from the callback of the Embedded Signup Flow. You should instead use a system user token from your Meta Business Manager.

To generate the token, follow these steps -

  • On your Meta Business Settings Page, click on Users -> System Users
  • Create a new System User with Admin access
  • Click on "Assign Assets" and assign Admin role to your Meta Developer App
  • Generate a token and save it securely
  • Grant access to this system to the WhatsApp Business Account

Once you generate the token, follow these steps -

  • Subscribe to the {{business_id}}/subscribed_apps endpoint
  • Register Phone Number using the {{Phone-Number-ID}}/register endpoint

Once you do these, the webhook callback from production should also work.

-1

There is a little field under the config of the WebHook from the Facebook frontend. Location of the field

Make sure you have a tick on "messages". This might help :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.