openbat-settings
Manage OpenBat chatbot settings, API keys (ingest/read/admin), webhooks, and custom metadata fields from the CLI or MCP.
Works with
--- name: openbat-settings description: Manage OpenBat chatbot settings, API keys (ingest/read/admin), webhooks, and custom metadata fields from the CLI or MCP. license: MIT --- # OpenBat — Settings + keys + webhooks ## Keys ```bash # Rotate the ingest (SDK) key — immediately invalidates the previous one: openbat settings keys rotate-ingest --chatbot $CB # Generate or rotate the read key (one per chatbot): openbat settings keys generate-read --chatbot $CB # Mint a fresh admin key (N admin keys per chatbot allowed): openbat settings keys generate-admin --chatbot $CB --name "CI key" --expires-in-days 30 # List admin keys for a chatbot: openbat settings keys list-admin --chatbot $CB # Revoke an admin key: openbat settings keys revoke-admin --chatbot $CB --key $KEY_ID ``` All mint commands print plaintext to **stderr** with a shown-once banner. Pipe to a password manager immediately. **Permission matrix:** - Mint admin: PAT required - Generate read / rotate ingest: admin or PAT - List admin keys: admin or PAT - Revoke admin: PAT required ## Scoping a key to one chatbot `ob_read_*` and `ob_admin_*` keys are **scoped to one chatbot server-side** — the simplest, safest credential for working on a single chatbot (and for the daily-eval / `openbat-optimize` loop). With one of these, the CLI/MCP can only ever see that chatbot; nothing to pin. A `ob_pat_*` spans many chatbots. To keep it locked to one, pin an active chatbot — `openbat use <id>` (CLI) or `OPENBAT_CHATBOT_ID` (MCP env). The MCP then hard-locks to that chatbot (see `using-openbat` → "Pin to one chatbot"). ## Webhooks ```bash openbat webhooks list --chatbot $CB openbat webhooks create --chatbot $CB --name slack-on-flag \ --url https://hooks.slack.com/services/T.../B.../X --type slack openbat webhooks delete --chatbot $CB --webhook $WH ``` Types: `discord`, `slack`, `custom`. Each is host-allowlisted at write time (SSRF defence). The signing secret returned at create time is shown ONCE. ## Chatbot settings ```bash openbat settings update --chatbot $CB \ --description "Help desk for Acme support" \ --website-url https://acme.com \ --language en ``` The allowlist of settable keys is enforced server-side by the shared API router and public v1 tool handler. Unknown keys are rejected to prevent property-level authorization issues. ## Custom metadata fields Metadata fields are auto-discovered from SDK capture payloads. They start as `pending` and can be accepted or denied: ```bash # CLI command not yet exposed — use the dashboard or MCP for now. ``` MCP tools `openbat_list_metadata_fields` and `openbat_update_metadata_field` support both flows; `openbat_update_metadata_field` accepts `fieldKey` (preferred) or `fieldId` when callers already have the field id. ## Gotchas - The read key has at most ONE active version per chatbot — generating a new read key implicitly rotates. - Admin keys support multiple-active for safe rotation; revoke explicitly. - Webhook signing secrets are not re-revealable. If you lose one, delete and recreate the webhook. - `delete_webhook` is irreversible — workflow nodes that reference the webhook will be invalidated at runtime.
More API Design skills
lark-event
larksuite/cli
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
lark-contact
larksuite/cli
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
lark-openapi-explorer
larksuite/cli
飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。

