docs: simplify Feishu configuration guide

This commit is contained in:
Re-bin 2026-02-05 06:05:09 +00:00
parent 50a4c4ca1a
commit f341de075d

View File

@ -248,20 +248,18 @@ nanobot gateway
Uses **WebSocket** long connection — no public IP required. Uses **WebSocket** long connection — no public IP required.
Requires **lark-oapi** SDK:
```bash ```bash
pip install lark-oapi pip install nanobot-ai[feishu]
``` ```
**1. Create a Feishu bot** **1. Create a Feishu bot**
- Visit [Feishu Open Platform](https://open.feishu.cn/app) - Visit [Feishu Open Platform](https://open.feishu.cn/app)
- Create a new app (Custom App) - Create a new app → Enable **Bot** capability
- Enable bot capability - **Permissions**: Add `im:message` (send messages)
- Add event subscription: `im.message.receive_v1` - **Events**: Add `im.message.receive_v1` (receive messages)
- Get credentials: - Select **Long Connection** mode (requires running nanobot first to establish connection)
- **App ID** and **App Secret** from "Credentials & Basic Info" - Get **App ID** and **App Secret** from "Credentials & Basic Info"
- **Verification Token** and **Encrypt Key** from "Event Subscriptions" - Publish the app
**2. Configure** **2. Configure**
@ -272,15 +270,16 @@ pip install lark-oapi
"enabled": true, "enabled": true,
"appId": "cli_xxx", "appId": "cli_xxx",
"appSecret": "xxx", "appSecret": "xxx",
"verificationToken": "xxx", "encryptKey": "",
"encryptKey": "xxx", "verificationToken": "",
"allowFrom": ["ou_xxx"] "allowFrom": []
} }
} }
} }
``` ```
> Get your Open ID by sending a message to the bot, or from Feishu admin console. > `encryptKey` and `verificationToken` are optional for Long Connection mode.
> `allowFrom`: Leave empty to allow all users, or add `["ou_xxx"]` to restrict access.
**3. Run** **3. Run**
@ -342,9 +341,9 @@ Config file: `~/.nanobot/config.json`
"enabled": false, "enabled": false,
"appId": "cli_xxx", "appId": "cli_xxx",
"appSecret": "xxx", "appSecret": "xxx",
"verificationToken": "xxx", "encryptKey": "",
"encryptKey": "xxx", "verificationToken": "",
"allowFrom": ["ou_xxx"] "allowFrom": []
} }
}, },
"tools": { "tools": {