Skip to content

Get active channels ​

The API endpoint /message/channels will return all current active channels.

A channel is considered active if there is at least one client connected to it.

Return active channels ​

POST https://portal.yourdomain.com/message/channels

Parameters

InNameTypeRequiredDescription
headercontent-typestringapplication/json
headeracceptstringapplication/json
bodyapiKeystringthe API key for your Klai app

Response 201 — Returns an object with two keys authenticated and anonymous. Each will have an array of current active channels.

{
    "authenticated": [
        "channelOne",
        "channelTwo"
    ],
    "anonymous": [
        "testRoom1",
        "testRoom2"
    ]
}

Notes ​

  • Results are scoped to the current domain host.
  • The response groups active channel names under authenticated and anonymous.

Klai Studio documentation