Get Group Messages

Lists all of the specific groups/channels messages on the server.

HTTP MethodURLRequires Auth

GET

/api/v1/groups.messages

Query Parameters

This endpoint supports thePagination parameters, alongside theQuery and Fields parameters.

KeyExample ValueDescription

roomId*

ByehQjC44FwMeiLbX

The group ID. The parameter is required if roomName is not provided.

roomName*

testGroup

The group name. The parameter is required if roomId is not provided.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     http://localhost:3000/api/v1/groups.messages?roomId=ByehQjC44FwMeiLbX

Example Response

{
    "messages": [
        {
            "_id": "CeXwh5eBbdrtvnqG6",
            "rid": "agh2Sucgb54RQ8dDo",
            "msg": "s",
            "ts": "2018-10-05T13:48:21.616Z",
            "u": {
                "_id": "KPkEYwKKBKZnEEPpt",
                "username": "marcos.defendi",
                "name": "Marcos Defendi"
            },
            "_updatedAt": "2018-10-05T13:48:49.535Z",
            "reactions": {
                ":frowning2:": {
                    "usernames": [
                        "marcos.defendi"
                    ]
                }
            },
            "mentions": [],
            "channels": [],
            "starred": {
                "_id": "KPkEYwKKBKZnEEPpt"
            }
        },
        {
            "_id": "MrAeupRiF9TvhMesK",
            "t": "room_changed_privacy",
            "rid": "agh2Sucgb54RQ8dDo",
            "ts": "2018-10-05T00:11:16.998Z",
            "msg": "Private Group",
            "u": {
                "_id": "rocketchat.internal.admin.test",
                "username": "rocketchat.internal.admin.test"
            },
            "groupable": false,
            "_updatedAt": "2018-10-05T00:11:16.998Z"
        }
    ],
    "count": 2,
    "offset": 0,
    "total": 2,
    "success": true
}

Change Log

VersionDescription

0.59.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.