---
title: "Action get_chat_room_messages"
description: "Gets chat room messages with pagination and stores them in constants."
---

# Action `get_chat_room_messages`

> **System ID:** `action_get_chat_room_messages`

## Description

Loads messages from an Operator Panel chat room (excluding system ones), with page support. The result is stored in constants `messages`, `messages_count`, `messages_total_pages`. Messages are sorted from newer to older.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **success** | Messages retrieved and stored |
| **error** | Missing parameters / `chat_room_id` or read error |

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `filters` | object | yes | — | Filters object |
| `filters.chat_room_id` | number / string | yes | — | Chat room ID. Supports placeholders |
| `pagination` | object | no | — | Pagination settings |
| `pagination.page_size` | number / string | no | `10` | Messages per page |
| `pagination.current_page` | number / string | no | `1` | Page number (from 1) |

## Configuration example

```json
{
  "filters": {
    "chat_room_id": "{{chat_room_id}}"
  },
  "pagination": {
    "page_size": 20,
    "current_page": 1
  }
}
```

## Related docs

- [Actions reference](/en/actionjail/reference/actions-reference.md)
