user / auth / websocket – Getting settings for connecting to a websocket server
After successfully authorizing the user and receiving the session, you can connect to the web socket server
{
    "state": 200,
    "data": {
        "server": "wss://api01.tazeros.com:8080",
        "token": "eef394fb-ff4d-4882-b042-d9c299357334"
    }
}
Name Description Type
server Websocket server String
token Token String
Web socket server authorization
All messages sent consist of the action attribute indicating the type of request and request for data transfer. After successfully opening the connection, you must complete authorization by passing a token to it. Any unauthorized messages are ignored.
{
    "action": "auth",
    "request": {
        "token": "eef394fb-ff4d-4882-b042-d9c299357334"
    }
}
Confirmation of receipt packets
For each request received from the web socket server, you must send a confirmation of receipt
Name Description Type Default value Required
id Websocket packer ID String Yes
{
    "action": "auth",
    "request": {
        "id": "33e78d60bc1f9dcc7291c891e6f069e4"
    }
}
Обновление статуса сообщения
{
    "action": "message",
    "response": {
        Message object
    }
}
Обновление статуса чата
{
    "action": "conversation",
    "response": {
        "id": "5d6691c42b528971789577af",
        "name": "Adele",
        "last_activity": 1567003189,
        "avatar": NULL,
        "unseen_count": 0,
        "mute": false,
        "can_delete": false,
        "accepted": true,
        "last_message": {
            Message object
        },
        "users": [
            {
                "avatar": "https://cdn01.tazeros.com/ee23a63d-767d-4d08-864f-9a0eb83a9bed",
                "dating_profile_id": NULL,
                "id": "c053359a-6cb1-4660-88d6-6c1272cdd372",
                "name": "Иван Иванов",
                "online": false
            }
        ]
    }
}
Name Description Type
id Идентификатор чата String
name Название String
last_activity Время последней активности Timestamp
last_message Последнее сообщение Message Object
avatar Изображение чата String
unseen_count Количество непрочитанных сообщений Integer
mute Отключены ли уведомления True / False
can_delete Может ли пользователь удалить чат True / False
accepted Получено ли разрешение на отправку сообщений True / False
users.id Идентификатор пользователя String
users.name Имя String
users.avatar Ссылка на изображение String
users.dating_profile_id Идентификатор профиля в модуле знакомств String
users.online Онлайн ли пользователь True / False
Обновление статуса настроек
{
    "action": "settings",
    "response": {
        Settings object
    }
}
Событие при начале / останове написания сообщений
{
    "action": "typing",
    "response": {
        "starte": "start"
    }
}