# Chuyển tiếp tin nhắn

1. Body

{% tabs %}
{% tab title="Tin nhắn dạng văn bản" %}

<table><thead><tr><th width="135">Name</th><th width="389">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>forwardMessage</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "forwardMessage",
    "service": "message",
    "data": {
        "accountId": "39456257143545255",
        "message": "xin chao",
        "msgType": "webchat",
        "toIds": ["1598980502599776027"],
        "toGroupIds": ["7070722571989963531"]
    }
}
</code></pre></td><td>ownerId: <em>sender id of replyMsg</em></td></tr></tbody></table>

{% endtab %}

{% tab title="Tin nhắn ảnh" %}

<table><thead><tr><th width="135">Name</th><th width="389">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>forwardMessage</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "forwardMessage",
    "service": "message",
    "companyCode": "esbt",
    "data": {
        "accountId": "39456257143545255",
        "message": 
         "{\"title\":\"\",\"oriUrl\":\"https://f66-zpg-r.zdn.vn/1655666658425094522/e9d4e5ccbcdc1a8243cd.jpg\",\"thumbUrl\":\"https://t-f66-zpg-r.zdn.vn/480/1655666658425094522/e9d4e5ccbcdc1a8243cd.jpg\",\"hdUrl\":\"https://b-f66-zpg-r.zdn.vn/1655666658425094522/e9d4e5ccbcdc1a8243cd.jpg\",\"width\":526,\"height\":526,\"properties\":null,\"normalUrl\":\"https://f66-zpg-r.zdn.vn/1655666658425094522/e9d4e5ccbcdc1a8243cd.jpg\",\"totalItemInGroup\":2,\"idInGroup\":1,\"isGroupLayout\":1,\"groupLayoutId\":1726818519109}",
        "msgType": "chat.photo",
        "toIds": ["1598980502599776027"],
        "toGroupIds": ["7070722571989963531"]
    }
}
</code></pre></td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="Tin nhắn file" %}

<table><thead><tr><th width="135">Name</th><th width="389">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>forwardMessage</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "forwardMessage",
    "service": "message",
    "companyCode": "esbt",
    "data": {
        "accountId": "39456257143545255",
        "message": 
         "{\"url\":\"https://fg40.dlfl.me/b3cd56edb6b662e83ba7/8948045068076386063\",\"fileName\":\"data (4).xls\",\"extension\":\"xls\",\"checksum\":\"7241fd63289285fec6568862ab1262f4\",\"fdata\":\"{}\",\"fType\":1,\"size\":\"185297\"}",
        "msgType": "share.file",
        "toIds": ["1598980502599776027"],
        "toGroupIds": ["7070722571989963531"]
    }
}
</code></pre></td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="Tin nhắn video" %}

<table><thead><tr><th width="135">Name</th><th width="389">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>forwardMessage</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "forwardMessage",
    "service": "message",
    "companyCode": "esbt",
    "data": {
        "accountId": "39456257143545255",
        "message": 
        "{\"videoUrl\":\"https://f143-zvc.dlmd.me/gr/c4c38b6abbe451ba08f5/2724346861517037762\",\"thumbUrl\":\"https://f51-zpg-r.zdn.vn/4897781870751314644/359bae167006d6588f17.jpg\",\"duration\":3455.354248046875,\"width\":720,\"height\":1558,\"fileSize\":915736,\"properties\":null}",
        "msgType": "chat.video.msg",
        "toIds": ["1598980502599776027"],
        "toGroupIds": ["7070722571989963531"]
    }
}
</code></pre></td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="Tin nhắn Danh thiếp" %}

<table><thead><tr><th width="135">Name</th><th width="389">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>message</td><td></td></tr><tr><td>method</td><td>forwardMessage</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json">{
    "method": "forwardMessage",
    "service": "message",
    "companyCode": "esbt",
    "data": {
        "accountId": "39456257143545255",
        "message": 
        "{\"contactUid\":\"7774028017516246539\",\"qrCodeUrl\":\"https://qr-talk.zdn.vn/0/823692544/f4d9b8e83abed3e08aaf.jpg\"}",
        "msgType": "recommened.user",
        "toIds": ["1598980502599776027"]
    }
}
</code></pre></td><td></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

2. Response

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

```json
{
    "data": {
        "error_message": "Successful.",
        "data": {},
        "error_code": 0
    },
    "status": "success"
}
```

{% endtab %}

{% tab title="400" %}

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

{% endtab %}
{% endtabs %}
