You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/getting-started/app-guides/chat-webhooks/index.mdx
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ desc: "Use chat webhooks to get notified about the events, for example, when the
9
9
10
10
## Introduction
11
11
12
-
This document explains how to configure the **Chat Webhooks** building block in <Placeholderid="DEVELOPER_CONSOLE_URL" />. It was written for everyone aiming to configure webhooks in their integrations **via user interface** instead of calling the LiveChat [Configuration API](/management/configuration-api/#webhooks) directly. The document assumes you're already familiar with the general idea of webhooks. It applies to the **Chat webhooks** (v3.3 or later).
12
+
This document explains how to configure the **Chat Webhooks** building block in <Placeholderid="DEVELOPER_CONSOLE_URL" />. It was written for everyone aiming to configure webhooks in their integrations **via user interface** instead of calling the LiveChat [Configuration API](/management/configuration-api/#webhooks) directly. The document assumes you're already familiar with the general idea of webhooks.
13
13
14
14
Keep in mind that the Chat Webhooks building block allows you to configure the `license` webhooks, and that is what this document focuses on. The document doesn't apply to the `bot` webhooks.
15
15
@@ -57,41 +57,54 @@ As a developer, you need to handle the authorization flow in your app. For a bac
57
57
58
58
Configuring chat webhooks in Developer Console is equivalent to calling the [Register Webhooks](/management/configuration-api/#register-webhook) method from the Configuration API. In both cases, all your registered webhooks will be automatically enabled for each license that installs your app and grants it access.
59
59
60
-
The configuration of the Chat Webhooks building block is a three-step process and involves the following aspects:
60
+
The configuration of the Chat Webhooks building block is a four-step process and involves the following aspects:
Once a webhook is added, you won't be able to edit it. If you need to make any changes to its configuration, you’ll need to re-register the webhook with the new settings.
72
+
70
73
#### Webhook URL
71
74
72
-
All the webhooks will be sent to the URL you provide in the **Webhook URL** field. That's likely the address of your backend service, but you can use [https://webhook.site](https://webhook.site) for testing.
75
+
All the webhooks will be sent to the URL you provide in the **Webhook URL** field. That's likely the address of your backend service, but you can use [https://webhook.site](https://webhook.site) for testing. Each of added webhooks can be sent to a different URL.
73
76
74
77
#### Secret key
75
78
76
-
We'll include your **secret key** in the payload of each webhook. This way, your application can verify the webhooks came from us. Make sure you save the generated secret key as it will disappear after you refresh the page. If needed, you can always regenerate a new key or paste your old one in the **Secret key** field.
79
+
We'll include your **secret key** in the payload of each webhook. This way, your application can verify the webhooks came from us. Make sure you save the generated secret key as it will disappear after you refresh the page. If needed, you can always regenerate a new key or provide a custom one in the **Secret key** field.
80
+
81
+
#### Webhook type
82
+
83
+
You can select from two options: `license` or `bot` webhooks. Bot webhooks let you configure automated bots that react to specific events. This tutorial focuses on the `license` webhooks, but you can read more about `bot` webhooks in [this tutorial](https://platform.text.com/resource-center/updates/setting-up-livechat-bot-webhooks).
77
84
78
85
#### Webhook triggers
79
86
80
-
Then, choose **webhook triggers**, the actions that will cause sending a webhook to the Webhook URL every time a specific event occurs. For the majority of events, you can also select a filter.
87
+
Then, choose the **webhook trigger**, the action that will cause sending a webhook to the Webhook URL every time a specific event occurs. For the majority of events, you can also select a filter.
-[The list of available webhooks](/management/webhooks/#available-webhooks)
83
94
-[The list of webhook filters](/management/configuration-api/#triggering-actions)
84
95
96
+
You can add only one trigger per webhook, but you can add multiple webhooks in one Chat Webhooks block. Each of the webhooks has its own ID.
97
+
85
98
### End result
86
99
87
100
Thanks to such a setup, webhook will be automatically enabled for users who install your app from the Marketplace once it is published.
88
101
89
102
### Testing chat webhooks
90
103
91
-
To test your webhooks, go to the **Private installation** tab and click **Install app**. If you used **Direct installation URL**, you'll see a popup window displaying the contents from your app (This is the stage of receiving `code` that you need to exchange it for `token`. In production-ready apps, your app should automatically close the window when authorizing a user. Then, perform the action that's your webhook trigger, for example, start a chat if you selected the `incoming_chat` webhook.
104
+
To test your webhooks, go to the **Private installation** tab and click **Install app**. If you used **Direct installation URL**, you'll see a popup window displaying the contents from your app (This is the stage of receiving `code` that you need to exchange it for `token`.) In production-ready apps, your app should automatically close the window when authorizing a user. Then, perform the action that's your webhook trigger, for example, start a chat if you selected the `incoming_chat` webhook.
@@ -104,4 +117,4 @@ Here's a list of useful resources related to webhooks:
104
117
105
118
## Contact us
106
119
107
-
If you have any questions or suggestions, feel free to email us at [developers@text.com](mailto:developers@text.com) or ask on our [Discord for Developers](https://discord.gg/NcfJu3a9kM).
120
+
If you have any questions or suggestions, feel free to email us at [platform@text.com](mailto:platform@text.com) or ask on our [Discord for Developers](https://discord.gg/NcfJu3a9kM).
0 commit comments