nimeet 文档中心
English

频道与用户管理

构建时从公开 REST 接口定义的 `channels` 标签生成:方法、路径、参数、请求体、响应与 curl。

由公开 REST 接口定义生成

版本 v1.1.0 · 更新于 2026-10-26 · 修订 1

分组概览

本页由公开 REST 接口定义在构建时生成:标签 channels,共 7 个操作(全量 189 个)。鉴权、信封与分页约定见 REST API 总览.

方法路径摘要
GET/v1/channelsList channels
GET/v1/channels/{channelName}/usersList users in a channel
GET/v1/channels/{channelName}/users/{uid}Get one user
DELETE/v1/channels/{channelName}/users/{uid}Kick a user
POST/v1/channels/{channelName}/users/{uid}/muteServer-side mute
POST/v1/channels/{channelName}/users/{uid}/roleChange role (host/audience)
POST/v1/channels/{channelName}/users/{uid}/unmuteLift a server-side mute

操作详情

GET /v1/channels

List channels

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
page_noqueryinteger>= 0,默认 0
page_sizequeryinteger1..500,默认 100

响应

状态码说明 / schema
200channels — object{ total, pageNo, pageSize, channels }
401Missing/invalid credentials — Error

调用示例

bash
curl -s -X GET "$NIMEET_API_BASE/v1/channels?page_no=0&page_size=100" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"

GET /v1/channels/{channelName}/users

List users in a channel

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
channelNamepath是string长度 0..128

响应

状态码说明 / schema
200users — object{ channel, users }
404Resource not found — Error

调用示例

bash
curl -s -X GET "$NIMEET_API_BASE/v1/channels/weekly-sync/users" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"

GET /v1/channels/{channelName}/users/{uid}

Get one user

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
channelNamepath是string长度 0..128
uidpath是integer1..2147483647

响应

状态码说明 / schema
200user — UserView
404Resource not found — Error

调用示例

bash
curl -s -X GET "$NIMEET_API_BASE/v1/channels/weekly-sync/users/10001" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC"

DELETE /v1/channels/{channelName}/users/{uid}

Kick a user

Removes the participant from the media plane, emits a leave callback with Agora reason 3, and creates a join_channel ban rule for the given duration (0 = kick only).

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
channelNamepath是string长度 0..128
uidpath是integer1..2147483647

请求体

字段类型必填说明
durationSecondsinteger0..86430
reasonstring
json
{
  "durationSeconds": 600,
  "reason": "docs-example"
}

响应

状态码说明 / schema
200the kick result and the ban rule it created — object{ kicked, uid, banRuleId, expireAt }
404Resource not found — Error

调用示例

bash
curl -s -X DELETE "$NIMEET_API_BASE/v1/channels/weekly-sync/users/10001" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"durationSeconds":600,"reason":"docs-example"}'

POST /v1/channels/{channelName}/users/{uid}/mute

Server-side mute

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
channelNamepath是string长度 0..128
uidpath是integer1..2147483647

请求体

字段类型必填说明
kindenum(audio | video | all)默认 "all"
banPublishboolean
durationSecondsinteger
json
{
  "kind": "audio",
  "banPublish": true,
  "durationSeconds": 600
}

响应

状态码说明 / schema
200the mute result, the tracks muted and the ban rules created — object{ muted, uid, kind, mutedTracks, banRuleIds }
404Resource not found — Error

调用示例

bash
curl -s -X POST "$NIMEET_API_BASE/v1/channels/weekly-sync/users/10001/mute" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"kind":"audio","banPublish":true,"durationSeconds":600}'

POST /v1/channels/{channelName}/users/{uid}/role

Change role (host/audience)

Updates media permissions and emits role_to_broadcaster (111) or role_to_audience (112).

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
channelNamepath是string长度 0..128
uidpath是integer1..2147483647

请求体

字段类型必填说明
roleenum(host | audience)是
json
{
  "role": "audience"
}

响应

状态码说明 / schema
200the user with its new role — object{ uid, role }
404Resource not found — Error

调用示例

bash
curl -s -X POST "$NIMEET_API_BASE/v1/channels/weekly-sync/users/10001/role" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"role":"audience"}'

POST /v1/channels/{channelName}/users/{uid}/unmute

Lift a server-side mute

鉴权:项目凭证(customerId:customerSecret 的 Base64)

参数

名称位置必填类型说明
channelNamepath是string长度 0..128
uidpath是integer1..2147483647

请求体

字段类型必填说明
kindenum(audio | video | all)默认 "all"
json
{
  "kind": "audio"
}

响应

状态码说明 / schema
200the unmute result and the tracks that were restored — object{ unmuted, uid, kind, unmutedTracks }

调用示例

bash
curl -s -X POST "$NIMEET_API_BASE/v1/channels/weekly-sync/users/10001/unmute" \
  -H "Authorization: Basic $NIMEET_CUSTOMER_BASIC" \
  -H "Content-Type: application/json" \
  -d '{"kind":"audio"}'

本分组用到的 Schema

ChannelSummary — object{ channelName, userCount, profile, createdAt }
字段类型必填说明
channelNamestring
userCountinteger
profileenum(communication | live)
createdAtstring | nullformat date-time
Error — object{ code, message, reason, sdkCode, details }
字段类型必填说明
codestring是stable machine code, see errors.json
messagestring是
reasonstring
sdkCodeintegerAgora-aligned client error number
detailsobject
UserView — object
字段类型必填说明
uidinteger
userIdstring | null
roleenum(host | audience)
platforminteger
joinedAtstringformat date-time
audioMutedboolean
videoMutedboolean
publishingobject{ audio, video, screen }

本页由文档构建流水线生成 · 2026-10-31 01:24:02 UTC · 文档中心 v1.1.0.

内容依据公开 API 定义.

ni-meet 是自建 RTC PaaS,媒体面基于 LiveKit(Apache-2.0),并与声网 API 兼容。