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
- Type: stringchannel
Id requiredThe channel id. Channels are not created explicitly — they exist by being used.
Query Parameters
- Type: stringcursor
Opaque keyset cursor returned by the previous page; absent on the last page.
- Type: integerlimitmin:1max:500
Page size (default 100, max 500).
Responses
- application/json
- application/json
- application/json
- application/json
curl 'https://api.useportal.co/v1/channels/chat-general/members?limit=100' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"members": [
{
"userId": "u_123",
"online": true,
"claims": {
"username": "ada"
}
},
{
"userId": "u_456",
"online": false,
"claims": {
"username": "grace"
}
}
],
"cursor": "u_456"
}