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);
प्रतिक्रिया200
{
  "data": [
    {
      "name": "orders-42"
    }
  ]
}

Lists the app's currently occupied channels, optionally filtered by name prefix.

पैरामीटर

realtime_app_idstring

ID of the Realtime app (rap_ prefix), as returned when the app was created.

Query पैरामीटर

prefixstring

Only channels whose name starts with this prefix (for example, presence-).

includearray

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).

Response Payload

data
array of object
आवश्यक

The occupied channels, sorted by name.

चाइल्ड एट्रिब्यूट दिखाएँ

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।