LangBot Docs
插件

从 GitHub 安装插件

从 GitHub 仓库安装插件。异步操作,POST 请求立即返回 `task_id`。若插件声明的 LangBot 版本范围与当前版本不兼容(或声明无效),且未传 `allow_incompatible: true`,异步任务将失败,可通过任务查询接口获取错误码 `plugin_incompatible_langbot_version` 及 `details`(包含 `current`、`min`、`max`、`status`: `"incompatible" | "invalid"`)。

POST
/api/v1/plugins/install/github

从 GitHub 仓库安装插件。异步操作,POST 请求立即返回 task_id。若插件声明的 LangBot 版本范围与当前版本不兼容(或声明无效),且未传 allow_incompatible: true,异步任务将失败,可通过任务查询接口获取错误码 plugin_incompatible_langbot_version 及 details(包含 current、min、max、status: "incompatible" | "invalid")。

Authorization

X-API-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/plugins/install/github" \  -H "Content-Type: application/json" \  -d '{    "url": "https://github.com/rocksclawbot/langbot-community-plugins/tree/main/disaster-alert"  }'
{  "code": 0,  "data": {    "task_id": 0  }}