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: en/deploy/platform/slack.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,17 +51,29 @@ Slack supports two connection methods: `Webhook` and `Socket`. If you don't have
51
51
52
52
## Start the Platform Adapter
53
53
54
-
The configuration is now complete. If you're using Socket mode, simply click the Save button in the bottom right corner of the configuration. If you're using Webhook mode, you can also configure the Slack Webhook Host, Slack Webhook Port, and Slack Webhook Path according to your needs. Generally, using the default values is sufficient.
54
+
The configuration is now complete. If you're using Socket mode, simply click the Save button in the bottom right corner of the configuration.
55
+
56
+
If you're using Webhook mode, please keep `Unified Webhook Mode (unified_webhook_mode)` enabled.
57
+
58
+
> [!TIP]
59
+
> Before v4.8.0, there is no `Unified Webhook Mode`. You need to fill in the following configuration items:
After successfully creating the platform adapter, return to the Slack settings. In the Event Subscriptions page on the left sidebar, click Enable Events to enable event reception.
60
66
61
-
If you're using Webhook mode, enter `https://your-domain/astrbot-slack-webhook/callback` in the `Request URL` field that appears.
67
+
If you're using Webhook mode:
68
+
69
+
- If `Unified Webhook Mode` is enabled, after clicking save, AstrBot will automatically generate a unique Webhook callback URL for you. You can find it in the logs or on the bot card in the WebUI's Bots page. Enter this URL in the `Request URL` field.
- If `Unified Webhook Mode` is not enabled, enter `https://your-domain/astrbot-slack-webhook/callback` in the `Request URL` field.
62
74
63
75
> [!TIP]
64
-
> In Webhook mode, you need to first set up your domain with your DNS provider, then use reverse proxy software to proxy the Slack Webhook Port you configured in the previous step to your domain. Alternatively, you can use Cloudflare Tunnel. For detailed tutorials, please refer to online resources; this tutorial will not cover these in detail.
76
+
> In Webhook mode, you need to first set up your domain with your DNS provider, then use reverse proxy software to forward requests to port `6185` on the AstrBot server (if Unified Webhook Mode is enabled) or the port specified in your configuration (if Unified Webhook Mode is not enabled). Alternatively, you can use Cloudflare Tunnel. For detailed tutorials, please refer to online resources; this tutorial will not cover these in detail.
65
77
66
78
After enabling, under Subscribe to bot events below, click Add Bot User Event and add the following events:
Starting from v4.8.0, AstrBot supports Unified Webhook Mode (unified_webhook_mode). When this mode is enabled, all platform adapters that support it will use the same Webhook callback endpoint, simplifying reverse proxy and domain configuration. You no longer need to configure separate ports, domains, and reverse proxies for each bot adapter.
4
+
5
+
Platform adapters that support Unified Webhook Mode include:
6
+
7
+
- Slack Webhook Mode
8
+
- WeChat Official Account
9
+
- WeCom Application
10
+
- WeCom AI Bot
11
+
- WeChat Customer Service Bot
12
+
- QQ Official Bot Webhook Mode
13
+
- ...
14
+
15
+
## How to Use Unified Webhook Mode
16
+
17
+
1. Have a domain (e.g., example.com) and a server with a public IP
18
+
2. Configure DNS resolution (e.g., astrbot.example.com)
19
+
3. Configure reverse proxy to forward requests from port 80 or 443 of your domain to AstrBot's WebUI port (default is 6185)
20
+
4. Go to AstrBot's `Configuration` page, click `System`, and set the `Externally Reachable Callback URL` to your configured URL (e.g., https://astrbot.example.com). Click save and wait for restart.
21
+
22
+
When configuring each platform adapter afterwards, enable `Unified Webhook Mode (unified_webhook_mode)`.
Once this mode is enabled, AstrBot will generate a unique Webhook callback URL for you. You just need to fill this URL into each platform's callback address field.
0 commit comments