List channel members

​

Returns the member directory of a standard channel, with each member's online state merged from live presence. This is a fetched directory, not live presence updates — subscribe to the channel WebSocket for live joins and leaves. Keyset-paged by cursor; cursor is absent on the last page.

The same endpoint serves both callers: use the control plane with a secret key for server-side roster reads, or the realtime edge with a user JWT for client reads. Broadcast channels have no membership concept and return 404 not_membership_channel. Browser CORS is enabled on the realtime edge, scoped to the environment's allowed origins. limit defaults to 100 and is capped at 500.

Path Parameters

  • The channel id. Channels are not created explicitly — they exist by being used.

Query Parameters

  • Opaque keyset cursor returned by the previous page; absent on the last page.

  • Page size (default 100, max 500).

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/v1/channels/{channelId}/members
curl 'https://api.useportal.co/v1/channels/chat-general/members?limit=100' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
Two members, one online, another page available
{
  "members": [
    {
      "userId": "u_123",
      "online": true,
      "claims": {
        "username": "ada"
      }
    },
    {
      "userId": "u_456",
      "online": false,
      "claims": {
        "username": "grace"
      }
    }
  ],
  "cursor": "u_456"
}