Skip to content
On this page

Room Reaction API

EndpointMethodDescription
room:likewebsocketLike room
room:unlikewebsocketUnlike room
room:onAvatarEmotionwebsocketOn avatar emotion
room:likedByUserwebsocketEventUser liked room event
room:unlikedByUserwebsocketEventUser unliked room event
room:onAvatarEmotionwebsocketEventOn avatar emotion event

Like room

Method: websocket

Endpoint: room:like

Request:

{
    "data": {
        "room": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Unlike room

Method: websocket

Endpoint: room:unlike

Request:

{
    "data": {
        "room": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

On avatar emotion

Method: websocket

Endpoint: room:onAvatarEmotion

Description: Api is used to translate 3d avatar emotion to other users in room.

Request:

{
    "data": {
        "roomId": string
        "videochatId": string
        "emotion": int
        "bundle": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

User liked room event

Event: room:likedByUser

Data:

{
    "data": {
        "roomId": string
        "userId": string
        "reaction": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

User unliked room event

Event: room:unlikedByUser

Data:

{
    "data": {
        "roomId": string
        "userId": string
        "reaction": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

On avatar emotion event

Event: room:onAvatarEmotion

Data:

{
    "data": {
        "userId": string
        "roomId": string
        "videochatId": string
        "emotion": int
        "bundle": string
    }
    "error": { "status": bool, "code": int, "message": string }
}