---
title: "List channel messages with the selected filter"
method: GET
path: "/v2/console/channel"
tags: ["Console"]
---

# List channel messages with the selected filter

`GET /v2/console/channel`

## Request

- Base URL: `http://127.0.0.1:7351`
- URL: `http://127.0.0.1:7351/v2/console/channel`
- Auth: API key in header `Authorization`

## Query parameters

- `type` 'UNKNOWN' | 'ROOM' | 'GROUP' | 'DIRECT'
- `label` string
- `group_id` string
- `user_id_one` string
- `user_id_two` string
- `cursor` string

## Response `200`

A successful response.

- ChannelMessageList: A list of channel messages, usually a result of a list operation.
  - `messages` ChannelMessage[]: A list of messages.
    - `channel_id` string: The channel this message belongs to.
    - `message_id` string: The unique ID of this message.
    - `code` integer: The code representing a message type or category.
    - `sender_id` string: Message sender, usually a user ID.
    - `username` string: The username of the message sender, if any.
    - `content` string: The content payload.
    - `create_time` string, date-time: The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
    - `update_time` string, date-time: The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
    - `persistent` boolean: True if the message was persisted to the channel's history, false otherwise.
    - `room_name` string: The name of the chat room, or an empty string if this message was not sent through a chat room.
    - `group_id` string: The ID of the group, or an empty string if this message was not sent through a group channel.
    - `user_id_one` string: The ID of the first DM user, or an empty string if this message was not sent through a DM chat.
    - `user_id_two` string: The ID of the second DM user, or an empty string if this message was not sent through a DM chat.
  - `next_cursor` string: The cursor to send when retrieving the next page, if any.
  - `prev_cursor` string: The cursor to send when retrieving the previous page, if any.
  - `cacheable_cursor` string: Cacheable cursor to list newer messages. Durable and designed to be stored, unlike next/prev cursors.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/heroiclabs/apis/nakama-console-api-v2.md) - [All operations](https://skmtc.dev/heroiclabs/apis/nakama-console-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/heroiclabs/apis/nakama-console-api-v2/revisions/fbde2e3c5ead?raw)
