Sign inGet Started

Get a Realtime channel

GET
/v1/realtime/apps/{realtime_app_id}/channels/{channel_name}
const channel = await bird.realtime.channels.get("rap_01krdgeqcxet5s7t44vh8rt9mg", "presence-lobby", {
  include: ["member_count"],
});
console.log(channel.occupied, channel.member_count);

Returns a single channel's occupancy and optional counts. A channel appears when its first connection subscribes and disappears when its last connection leaves. An unknown or unused name returns 200 OK with occupied: false.

Parameters

realtime_app_idstring

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

channel_namestring

Name of the Realtime channel to retrieve.

Query Parameters

includearray

Attributes to include. Repeatable. Requesting member_count for a non-presence channel, or connection_count when the app's connection-counting flag is off, returns a validation error (400).

Response Payload

member_count
integer

Distinct members (presence channels only; requires include=member_count).

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.

occupied
boolean
required

Whether at least one client is subscribed.

Continue with the documentation, guides and examples for this topic.