Documentation
Sign inGet started

List Realtime channels

GET
/v1/realtime/apps/{realtime_app_id}/channels
const { data } = await bird.realtime.channels.list("rap_01krdgeqcxet5s7t44vh8rt9mg", {
  prefix: "presence-",
  include: ["member_count"],
});
for (const channel of data) console.log(channel.name, channel.member_count);
Lists the app's currently occupied channels, optionally filtered by name prefix.
查询参数
prefix
string
Only channels whose name starts with this prefix (e.g. "presence-").
include
array
Per-channel attributes to include. Repeatable. Requesting member_count without a presence-channel prefix, or connection_count when the app's connection-counting flag is off, returns a validation error (400).
响应载荷
data
array of object
必填
The occupied channels, sorted by name.
显示子属性
data.member_count
integer
Distinct members (presence channels only; requires include=member_count).
data.connection_count
integer
Connections currently subscribed to this channel (requires include=connection_count and the app's connection-counting flag). Channel-scoped — distinct from the app-wide peak connections metric.
data.name
string
必填
A Realtime channel name. Only letters, digits, and _ - = @ , . ; Prefix with private- or presence- for authenticated channels.