--- title: "Get Channel Messages" slug: "get-channel-messages" updated: 2026-09-03T14:50:33Z published: 2026-09-03T14:50:33Z canonical: "developer.rocket.chat/get-channel-messages" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Get Channel Messages Get/api/v1/channels.messages Lists all the channel's messages. Permissions required: `view-c-room`, `view-joined-room` ### Changelog | Version | Description | | --- | --- | | 7.0.0 | Added `mentionIds`, `starredIds`, `pinned` query parameters. | | 0.59.0 | Added | Header parametersX-Auth-TokenstringRequired The `authToken` of the authenticated user. ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f X-User-IdstringRequired The `userId` of the authenticated user. ExamplerbAXPnMktTFbNpwtJ Query parametersroomIdstringRequired The room id. Examplejdiue8TGkodp countinteger The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more. Example50 sort List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more. offsetinteger Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more. Example50 mentionIdsstring Filter the messages where a user has been mentioned by the userId. For a set of userIds, use an array (`["838ndhd79w", "dud0wu900"]`). Example838ndhd79w starredIdsstring Filter the messages a user have starred by userId. For a set of userIds, use an array (`["838ndhd79w", "dud0wu900"]`). Exampledud0wu900 pinnedstring Filter pinned messages. Exampletrue Responses200 OK Success ```json { "messages": [ { "_id": "uASTuwBEu7SBDAxxh", "rid": "6513afeda2f73c7460e18c86", "msg": "threaads produced links", "ts": "2023-09-27T04:36:47.522Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:36:47.698Z", "urls": [], "mentions": [], "channels": [], "md": [ { "type": "PARAGRAPH", "value": [ { "type": "PLAIN_TEXT", "value": "threaads produced links" } ] } ] }, { "_id": "B7Yms4bCvgJsitrBq", "rid": "6513afeda2f73c7460e18c86", "msg": "always do", "ts": "2023-09-27T04:34:38.818Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:34:38.900Z", "urls": [], "mentions": [], "channels": [], "md": [ { "type": "PARAGRAPH", "value": [ { "type": "PLAIN_TEXT", "value": "always do" } ] } ] }, { "_id": "3rfQYmS8MzCKnQbcu", "rid": "6513afeda2f73c7460e18c86", "msg": "", "ts": "2023-09-27T04:34:34.259Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:36:38.258Z", "urls": [], "mentions": [], "channels": [], "replies": [ "rbAXPnMktTFbNpwtJ" ], "tcount": 0, "tlm": "2023-09-27T04:34:50.746Z", "attachments": [], "editedAt": "2023-09-27T04:36:19.494Z", "editedBy": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" }, "reactions": {}, "t": "rm" }, { "_id": "6513b143a2f73c7460e18c88", "rid": "6513afeda2f73c7460e18c86", "msg": "test messages", "ts": "2023-09-27T04:34:34.259Z", "u": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie", "name": "test test" }, "_updatedAt": "2023-09-27T04:36:19.486Z", "urls": [], "mentions": [], "channels": [], "md": [ { "type": "PARAGRAPH", "value": [ { "type": "PLAIN_TEXT", "value": "test messages" } ] } ], "replies": [ "rbAXPnMktTFbNpwtJ" ], "tcount": 1, "tlm": "2023-09-27T04:34:50.746Z", "_hidden": true, "parent": "3rfQYmS8MzCKnQbcu", "editedAt": "2023-09-27T04:36:19.485Z", "editedBy": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" } } ], "count": 4, "offset": 0, "total": 4, "success": true } ``` Expand Allobject messages Array of object object _idstring ridstring msgstring tsstring uobject _idstring usernamestring namestring _updatedAtstring urls Array of object object mentions Array of object object channels Array of object object md Array of object object typestring value Array of object object typestring valuestring replies Array of string string tcountinteger tlmstring attachments Array of object (Attachment) object tsstring Example1970-01-01T00:00:00.000Z titlestring title_linkstring title_link_downloadboolean image_dimensionsobject widthinteger Example444 heightinteger Example360 image_previewstring Example/9j/2wBDAAYEBQ... image_urlstring Example/file-upload/PNTaE9SBQasdpAwk2/img_1.jpg image_typestring Exampleimage/jpeg image_sizeinteger Example26674 typestring Examplefile descriptionstring Example editedAtstring editedByobject _idstring usernamestring reactionsobject tstring _hiddenboolean parentstring countinteger offsetinteger totalinteger successboolean 401 Unauthorized Authorization Error ```json { "status": "error", "message": "You must be logged in to do this." } ``` object statusstring messagestring