To get alerted when you receive a message or when a message’s status has changed, you need to set up a Webhooks endpoint for your app. Setting up Webhooks doesn’t affect the status of your phone number and does interfere with you sending or receiving messages.
To get started, first you need to create the endpoint. You can create a custom Webhook URL running on a web server, or use services that help you set up an endpoint, such as Glitch. See Create a Sample App Endpoint for Webhooks Testing for help.
Once your endpoint is ready, go to your App Dashboard.
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. 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.