Webhook technology allows you to fulfill incoming notifications directly to your server

A webhook is an HTTP callback that sends data to your website or app when a certain event happens. They are typically used to update third-party services in real time. As we learned in the introduction, a customized Webhook sends you notifications when certain events occur on your WhatsApp. These notifications will come to you automatically as soon as the event occurs.

The advantages of this technology are the fastest possible receipt of incoming notifications and high bandwidth, limited only by the speed of notification processing on your server side.

In this article, we will cover how to configure and test the webhook, what events it tracks, and what settings you might find useful.

In order to receive incoming webhooks, a public IP address / host is required to be accessible from the Internet. This way the Whapi.Cloud server will be able to make a call to your server at the specified address and deliver the incoming webhook.

Server configuration

  1. Whapi.Cloud does not accept webhooks that aren’t HTTPS;

  2. Your endpoint needs to accept a POST/PUT/PATCH/DELETE;

Our webhooks (Tracked events)

  • Messages: got new message / edit message / delete message;

  • Statuses: got message status;

  • Chats: got chat / chat update / chat remove;

  • Contacts: contact update;

  • Presences: got presences;

  • Groups: new group / participants update / group update;

  • Calls: got call events;

  • Labels: new label / remove label;

  • Users: connecting a session / disconnecting a session;

  • Channel: instance status changed / QR-code update;

  • Service: special notifications about Whapi integrations.

For a detailed description of all webhooks, see here: Our webhooks (Tracked events)

How do I configure my webhook?

You can configure incoming notifications either interactively or through the API. You will need an authorized channel to enable these settings.

On the channel page, you will need to find the "Settings" button in the top right corner. After an additional settings window appears, set a direct link to the webhook and enable the settings you need.

We have prepared instructions in a separate guide: How to set up webhook?

Debug incoming webhooks

To debug incoming notifications, you can use any free service on the Internet, such as the webhook.site service.

The service provides a unique address (URL), which must be set as the value of the link to webhook in the channel settings.

Detailed instructions and how to test locally are described in the manual: How to check the webhook?

What request comes to Webhook?

For each request there is a specific JSON body.

For a detailed description of the format of incoming notifications, see manual: Incoming webhooks format

Receive incoming webhooks

After receiving an incoming request to your server address, you will need to process the received hook.

You can find PHP / Python / NodeJS code examples for handling incoming webhooks here: Receive messages

Our support

Remember, if you have any questions or issues along the way, our support team is always available to help. We value every user and strive to ensure that your experience with our API is as smooth and efficient as possible.

You can write to the web chat widget on our main website, or in your personal account. Or write to us by e-mail: care@whapi.cloud

Last updated