For AI agents: markdown of this page — /docs-content-en/bots/chats/user-list.md documentation index — /llms.txt

List participants

GET /v1/bots/:botId/chats/:dialogId/users

Returns the list of chat participants. The bot must be a participant of the chat.

Parameters

Parameter Type Req. Default Description
botId (path) number yes Bot ID
dialogId (path) string yes Dialog ID (chatXXX)
limit (query) number no 50 Number of records (1-200)

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/users?limit=100" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/users?limit=100" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/users?limit=100', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Participants:', data.length)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/users?limit=100', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()

Response fields

Field Type Description
data array Array of participants
data[].id number User ID
data[].name string Full name
data[].firstName string First name
data[].lastName string Last name
data[].workPosition string Position
data[].color string Avatar color
data[].avatar string Avatar URL
data[].gender string Gender
data[].active boolean Whether the account is active
data[].bot boolean Whether it is a bot
data[].status string User status

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "John Smith",
      "firstName": "John",
      "lastName": "Smith",
      "workPosition": "Manager",
      "color": "AZURE",
      "avatar": "",
      "gender": "M",
      "active": true,
      "bot": false,
      "status": "online"
    },
    {
      "id": 42,
      "name": "Support",
      "firstName": "Support",
      "lastName": "",
      "workPosition": "Assistant",
      "color": "AZURE",
      "avatar": "",
      "gender": "",
      "active": true,
      "bot": true,
      "status": "online"
    }
  ]
}

Error response example

502 — the bot is not a participant of the chat:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Access denied"
  }
}

Errors

HTTP Code Description
400 INVALID_BOT_ID botId is not a number
404 BOT_NOT_FOUND No bot found with this ID
403 BOT_ACCESS_DENIED The bot belongs to another API key
502 BITRIX_ERROR Bitrix24 error (error text in message)
403 SCOPE_DENIED The API key does not have the imbot scope
401 TOKEN_MISSING The API key has no configured tokens

Full list of common API errors — Errors.

See also