diff --git a/docs/channels/feishu.md b/docs/channels/feishu.md index e86af5ed6..a702ba83e 100644 --- a/docs/channels/feishu.md +++ b/docs/channels/feishu.md @@ -9,6 +9,12 @@ read_when: Status: experimental. Supports direct messages and groups via Bot API using WebSocket long connection. +## Demo + + + Feishu Bot Demo + + ## Key Features - **WebSocket long connection**: No public IP or webhook setup required @@ -60,15 +66,17 @@ Request approval if required by your organization. ### 4. Configure Credentials -**Option A: Environment variables** +**Option A: Clawdbot config** ```bash -export FEISHU_APP_ID=cli_xxxxxxxxxx -export FEISHU_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx +clawdbot config set channels.feishu.enabled true +clawdbot config set channels.feishu.appId "cli_xxxxxxxxxx" +clawdbot config set channels.feishu.appSecret "xxxxxxxxxxxxxxxxxxxxxxxx" ``` -**Option B: Configuration file** +**Option B: Configuration file** +~/.clawdbot/clawdbot.json ```json5 { channels: { @@ -81,6 +89,14 @@ export FEISHU_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx } ``` +**Option C: Environment variables** + +```bash +export FEISHU_APP_ID=cli_xxxxxxxxxx +export FEISHU_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx +``` + + ### 5. Publish and Start 1. Go to "Version Management and Release" in Feishu console @@ -130,13 +146,26 @@ All outbound messages use Feishu interactive card format with markdown: | `open` | Anyone can message (requires `allowFrom: ["*"]`) | | `disabled` | DMs blocked | +#### Pairing Flow + +When a new user messages your bot with `dmPolicy: "pairing"` (default), they receive a pairing code: + + + Feishu Pairing Code + + **Approve pairing requests:** ```bash +# List pending pairing requests clawdbot pairing list feishu -clawdbot pairing approve feishu + +# Approve a specific code +clawdbot pairing approve feishu KZ6YE87U ``` +Once approved, the user can interact with the bot normally. + ### Groups - Default policy: `allowlist` - only allowed groups receive responses diff --git a/docs/images/feishu/demo-chat.png b/docs/images/feishu/demo-chat.png new file mode 100644 index 000000000..0ec0be17a Binary files /dev/null and b/docs/images/feishu/demo-chat.png differ diff --git a/docs/images/feishu/pairing-code.png b/docs/images/feishu/pairing-code.png new file mode 100644 index 000000000..c71cc61aa Binary files /dev/null and b/docs/images/feishu/pairing-code.png differ