With Webhooks set up, you can receive real-time HTTP notifications from the WhatsApp Business Platform. This means you get notified when, for example, you get a message from a customer or there are changes to your WhatsApp Business Account (WABA).
To set up your Webhook, you need to create an internet-facing web server with a URL that meets Meta’s and WhatsApp’s requirements. See Creating an Endpoint for instructions on how to do that. If you need an endpoint for testing purposes, you can generate a test Webhooks endpoint.
App Setup
Once the endpoint is ready, configure it to be used by your Meta app:
In your App Dashboard, find the WhatsApp product and click Configuration. Then, find the webhooks section and click Configure a webhook. After the click, a dialog appears on your screen and asks you for two items:
- Callback URL: This is the URL Meta will be sending the events to. See the Webhooks, Getting Started guide for information on creating the URL.
- Verify Token: This string is set up by you, when you create your Webhook endpoint.
After adding the information, click Verify and Save.
Back in the App Dashboard, click WhatsApp > Configuration in the left-side panel. Under Webhooks, click Manage. A dialog box will open with all the objects you can get notified about. To receive messages from your users, click Subscribe for messages.
You only need to set up Webhooks once for every application you have. You can use the same Webhook to receive multiple event types from multiple WhatsApp Business Accounts. For more information, see our Webhooks section.
At any time, each Meta App can have only one endpoint configured. If you need to send your Webhook updates to multiple endpoints, you need multiple Meta Apps.