获取 Channel
curl --request GET \
--url https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId} \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "channel_feishu_xxx",
"type": "channel",
"channel_type": "feishu",
"name": "飞书 Channel xxx",
"template": {
"agent": {
"type": "agent",
"id": "agent_xxx",
"version": 3
},
"environment_id": "env_xxx",
"vault_ids": [],
"file_ids": [],
"memory_stores": []
},
"enabled": true,
"binding_status": "bound",
"connection_status": "disconnected",
"channel_config": {
"response_options": {
"include_tool_calls": false,
"include_process": false,
"card_output": true
},
"private_memory_store_enabled": false,
"group_prompt_template": null,
"group_reply_in_thread": true
},
"last_error": null,
"created_at": "2026-10-30T00:00:00.000Z",
"updated_at": "2026-10-30T00:00:00.000Z"
}Channel
获取 Channel
读取指定 Channel 的固定 Agent 版本、配置、绑定状态、连接状态和最近连接错误。凭据、扫码 token、平台消息 ID、内部 Session ID 和计费字段不回显。
GET
/
agent
/
forward
/
v0
/
channels
/
{channelId}
获取 Channel
curl --request GET \
--url https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId} \
--header 'Authorization: Bearer <token>' \
--header 'zai-beta: <zai-beta>' \
--header 'zai-version: <zai-version>'import requests
url = "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
headers = {
"zai-version": "<zai-version>",
"zai-beta": "<zai-beta>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'zai-version': '<zai-version>',
'zai-beta': '<zai-beta>',
Authorization: 'Bearer <token>'
}
};
fetch('https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}")
.header("zai-version", "<zai-version>")
.header("zai-beta", "<zai-beta>")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("zai-version", "<zai-version>")
req.Header.Add("zai-beta", "<zai-beta>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/{channelId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zai-beta: <zai-beta>",
"zai-version: <zai-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "channel_feishu_xxx",
"type": "channel",
"channel_type": "feishu",
"name": "飞书 Channel xxx",
"template": {
"agent": {
"type": "agent",
"id": "agent_xxx",
"version": 3
},
"environment_id": "env_xxx",
"vault_ids": [],
"file_ids": [],
"memory_stores": []
},
"enabled": true,
"binding_status": "bound",
"connection_status": "disconnected",
"channel_config": {
"response_options": {
"include_tool_calls": false,
"include_process": false,
"card_output": true
},
"private_memory_store_enabled": false,
"group_prompt_template": null,
"group_reply_in_thread": true
},
"last_error": null,
"created_at": "2026-10-30T00:00:00.000Z",
"updated_at": "2026-10-30T00:00:00.000Z"
}状态
| 字段/值 | 含义 |
|---|---|
binding_status: unbound | 微信尚未完成扫码确认 |
binding_status: pending | 微信绑定处理中,继续查询扫码会话并完成手机确认 |
binding_status: bound | 已绑定;Feishu / WeCom / DingTalk 通常创建后即为此状态 |
connection_status: disconnected | 尚未建立连接,正常创建初始状态 |
connection_status: connecting | 连接中 |
connection_status: connected | 已建立连接 |
connection_status: error | 连接错误,查看 last_error |
connected 只表示连接已建立;平台是否投递消息、Agent 是否成功处理以及最终文本/附件是否送达,需要分别验证。last_error 主要反映连接问题,不能单独证明某轮执行成功。
渠道专属输出
四渠道均返回response_options、private_memory_store_enabled、group_prompt_template;WeChat 的群聊模板固定 null。仅 Feishu 返回 group_reply_in_thread,仅 DingTalk 返回 card_template_id / card_content_key。WeCom / WeChat 不返回这些专属字段。返回结构与 Create、List.data[] 和 PATCH 成功响应一致。
请求示例
curl --request GET "https://agent-api.bigmodel.cn/api/agent/forward/v0/channels/$CHANNEL_ID" \
--header "Authorization: Bearer $ZHIPUAI_API_KEY" \
--header "zai-version: 2026-05-26" \
--header "zai-beta: managed-agents-2026-05-26"
Authorizations
标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。
Headers
Response
请求成功。
- 飞书
- 企业微信
- 钉钉
- 个人微信
固定 Agent 版本和渠道安全配置。不回显 credentials、扫码 token、平台消息 ID、内部 Session ID 或计费字段。
Was this page helpful?