Set the webhook link to the channel
Last updated
Last updated
This article will tell you the ways in which you can install and configure a webhook on an instance (Whapi channel).
From where and how to get or create a webhook link, have covered in this article: Where to Find the Webhook URL?
One of the advantages of Whapi.Cloud is the ability to flexibly and automatically customize and manage hooks to your liking, and a lot of advanced settings will simplify your work.
When you connect a channel, you'll be prompted to personalize it. For example, give the channel a name, customize webhooks, and change other settings according to your preferences. However, you can skip these steps and come back to them later.
To set the webhook after initializing the channel, go to the channel settings (the button in the upper right corner). The first block is the webhooks section. Specify the URL of your server to which notifications will be sent. Add other hooks if necessary.
That is, every time the connected number receives an interaction, we will make a request with the POST
/PUT
/PATCH
/DELETE
method to the previously configured URL.
(For each request there is a specific JSON body).
You can learn how to process incoming data in separate tutorials here:
Details on all the fine points of customization, each customization mode and events will be explained later.
You can also install webhooks and update all settings via API. To do this, use the method of updating channel settings:
If a field is not present in the request, no change is made to that setting. For example, if 'proxy' is not sent with the request, the existing configuration for 'proxy' is unchanged.
We offer a number of settings that affect the amount of data sent by the server, these settings can be changed in the interface or through the API. More information about this in the manual: Detailed webhook settings
Especially for this purpose, we offer you a special endpoint that allows you to simulate any callback on any event. Thus, you can check if your link is available for our API, as well as see the format of the callback itself.