> For the complete documentation index, see [llms.txt](https://docs.salework.net/salework-tai-lieu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.salework.net/salework-tai-lieu/salework-zalo-open-api/contact/trang-thai-truc-tuyen-ban-be.md).

# Trạng thái trực tuyến bạn bè

1. Body

<table><thead><tr><th>Name</th><th width="359">Type</th><th>Description</th></tr></thead><tbody><tr><td>service</td><td>contact</td><td></td></tr><tr><td>method</td><td>onlineStatus</td><td></td></tr><tr><td>data</td><td><pre class="language-json"><code class="lang-json"><strong>{
</strong>  "accountId": "262941598338491044",
<strong>  "toId": "4325999268826850338"
</strong>}
</code></pre></td><td></td></tr></tbody></table>

2. Response

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

```json
{
    "data": {
        "error_message": "Successful.",
        "data": {
            "settings": {
                "show_online_status": true // Có hiển thị trạng thái hoạt động hay không
            },
            "lastOnline": 0 // Truy cập lần cuối dạng ts
        },
        "error_code": 0
    },
    "status": "success"
}
```

{% endtab %}

{% tab title="400" %}

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

{% endtab %}
{% endtabs %}
