[POST] .../v1/chat/getuserpresence
Returns presence for users who share an active chat with the current user. Use this method to show online/offline indicators for users that participate in chats together with the current request user. The request body is required and user_ids must contain at least one user identifier when filters are not used; filters metadata exposes user_id as the filter field. The response returns ChatUserPresence records with online and last_online_date values and access is scoped so the current user can see only users who share an active chat. Missing body, missing user_ids, invalid user identifiers, denied chat-sharing scope, presence-cache errors and database failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| user_id | int | User IDs whose presence should be returned. Required filter field. |
Request Example
{
"filters": [
{
"field": "user_id",
"operator": "In",
"value": "42,64"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of ChatUserPresence | Result array. |
Response Example
{
"ok": true,
"result": [
{
"user_id": 42,
"online": true,
"last_online_date": 1767225600
},
{
"user_id": 64,
"online": false,
"last_online_date": 1767222000
}
]
}