# Lấy danh sách tin nhắn nhóm

1. Body

<table><thead><tr><th>Name</th><th width="359">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>getGroupMsg</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "getGroupMsg",
    "service": "message",
    "data": {
        "accountId": "39456257143545255",
        "groupId": "7070722571989963531",
        "globalMsgId": "5838610844525"
    }
}
</code></pre></td><td></td></tr></tbody></table>

2. Response

{% tabs %}
{% tab title="200" %}

```json
{
    "data": {
        "error_message": "Successful.",
        "data": {
            "lastMsgId": "5836002262463", // msgId của tin nhắn cuối
            "hasMore": 0, // Có còn tin nhắn hay không
            "groupMsgs": [
                {
                    "msgType": "webchat", // Loại tin nhắn
                    "idTo": "7070722571989963531", // group_id
                    "msgId": "5838568651585",
                    "content": "Chiu",
                    "uidFrom": "0", // id người gửi
                    "quote": { // thông tin của tin nhắn được trả lời (nếu có)
                        "globalMsgId": 5836005608509,
                        "msg": "", 
                        "fromD": "Saint Laurent", // Người gửi tin nhắn
                        "cliMsgId": 1726471613254,
                        "cliMsgType": 32, // number - loại tin nhắn
                        "attach": "{\"msgBubbleLayoutType\":1,\"thumb\":\"https:\/\/t-f50-zpg-r.zdn.vn\/480\/25075273188988217\/082f646d6034c66a9f25.jpg\",\"href\":\"https:\/\/f50-zpg-r.zdn.vn\/25075273188988217\/082f646d6034c66a9f25.jpg\",\"params\":\"{\\\"tracking\\\":{\\\"subsource\\\":\\\"0\\\",\\\"source\\\":0},\\\"width\\\":2000,\\\"hd\\\":\\\"https:\\\\\/\\\\\/b-f50-zpg-r.zdn.vn\\\\\/25075273188988217\\\\\/082f646d6034c66a9f25.jpg\\\",\\\"height\\\":1497}\",\"childnumber\":0}", // chi tiết tin nhắn
                        "ownerId": 39456257143545255, // id người gửi
                        "ts": 1726471613297
                    },
                    "cliMsgId": "1726541642393",
                    "dName": "Saint Laurent",
                    "mentions": null, // Danh sách được nhắc tên
                    "ts": "1726541642555",
                    "status": 3
                },
                {
                    "msgType": "webchat",
                    "idTo": "7070722571989963531",
                    "msgId": "5836264387455",
                    "content": "chung ta group",
                    "uidFrom": "0",
                    "quote": null,
                    "cliMsgId": "1726475723109",
                    "dName": "Saint Laurent",
                    "mentions": null,
                    "ts": "1726475723198",
                    "status": 3
                }
            ],
            "error": 0,
            "maxMsgId": "5838610830235",
            "rootMsgId": null,
            "minMsgId": "5836002262463",
            "msgJumpId": "0"
        },
        "error_code": 0
    },
    "status": "success"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "status": "error",
    "error": {
        "message": "Something wrong was happened.",
        "code": null,
        "prms": null
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.salework.net/salework-tai-lieu/salework-zalo-open-api/message/lay-danh-sach-tin-nhan-nhom.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
