飞书和 Lark
通知目标格式
Section titled “通知目标格式”lark://<webhook-token>[:<signing-secret>]@webhook[?domain=feishu]LarkSuite Webhook:
lark://WEBHOOK_TOKEN@webhook带签名的飞书 Webhook:
lark://WEBHOOK_TOKEN:SIGNING_SECRET@webhook?domain=feishudomain=feishu 会选择 open.feishu.cn;未指定时使用 open.larksuite.com。
只有标题时会生成文本消息。包含正文时,会生成交互式卡片:标题位于卡片头部,正文使用 Markdown。
提供签名密钥时,Statocysts 会生成 Webhook 所需的时间戳和 HMAC-SHA256 签名。
提供方专属选项
Section titled “提供方专属选项”直接调用 lark.send() 可以传入:
import { lark } from 'statocysts'
await lark.send(target, notification, { baseUrl: 'https://open.larksuite.com', fetchOptions: { timeout: 5000 },})baseUrl 适用于测试或兼容代理;正常的飞书/Lark 选择应使用 domain 查询参数。