# Get connected users

The API endpoint `/message/users` will return all users connected to all or specific active channels, which means channels that currently have at least one user listening to it.

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

## API: Return connected users

<mark style="color:green;">`POST`</mark> `https://yourdomain.com/message/users`

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| accept       | string | application/json |
| content-type | string | application/json |

#### Request Body

| Name    | Type   | Description                                              |
| ------- | ------ | -------------------------------------------------------- |
| apiKey  | string | the API key for your BF app                              |
| channel | string | if set, will only return users connected to this channel |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.klai.studio/v1/reference/messaging-ver-0.10.14+/get-all-users-connected.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
