Debian Codegraph @

docs/services/chat/lark/index.md

raw
1 # Lark
2
3 Send notifications to Lark using a custom bot webhook.
4
5 ## URL Format
6
7 !!! info ""
8 lark://__`host`__/__`token`__?secret=__`secret`__&title=__`title`__&link=__`url`__
9
10 --8<-- "docs/services/chat/lark/config.md"
11
12 - `host`: The bot API host (`open.larksuite.com` for Lark, `open.feishu.cn` for Feishu).
13 - `token`: The bot webhook token (required).
14 - `secret`: Optional bot secret for signed requests.
15 - `title`: Optional message title (switches to post format if set).
16 - `link`: Optional URL to include as a clickable link in the message.
17
18 ### Example URL
19
20 ```url
21 lark://open.larksuite.com/abc123?secret=xyz789&title=Alert&link=https://example.com
22 ```
23
24 ## Create a Custom Bot in Lark
25
26 Official Documentation: [Custom Bot Guide](https://open.larksuite.com/document/client-docs/bot-v3/add-custom-bot)
27
28 1. __Invite the Custom Bot to a Group__:
29 a. Open the target group, click `More` in the upper-right corner, and then select `Settings`.
30 b. In the `Settings` panel, click `Group Bot`.
31 c. Click `Add a Bot` under `Group Bot`.
32 d. In the `Add Bot` dialog, locate `Custom Bot` and select it.
33 e. Set the bot’s name and description, then click `Add`.
34 f. Copy the webhook address and click `Finish`.
35
36 2. __Get Host and Token__:
37 - For __Lark__: Use `host = open.larksuite.com`.
38 - For __Feishu__: Use `host = open.feishu.cn`.
39 - The `token` is the last segment of the webhook URL.
40 For example, in `https://open.larksuite.com/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxx`, the token is `xxxxxxxxxxxxxxxxx`.
41
42 3. __Get Secret (Optional)__:
43 a. In group settings, open the bot list, find your custom bot, and select it to access its configuration.
44 b. Under `Security Settings`, enable `Signature Verification`.
45 c. Click `Copy` to save the secret.
46 d. Click `Save` to apply the changes.