Skip to content
On this page

Textchat API

Textchat API is deprecated. Use Channel API instead .

EndpointMethodDescription
textchat:getTextchatForRoomwebsocketGet textchat for room
textchat:getTextchatForPropwebsocketGet textchat for prop
textchat:getTextchatForVideochatwebsocketGet textchat for videochat
textchat:getTextchatForUserwebsocketGet textchat for user (direct textchat)
textchat:getLastMessagewebsocketGet last textchat message
textchat:listMessageswebsocketList textchat messages
textchat:markTextchatAsReadwebsocketMark textchat as read
textchat:listTextchatswebsocketList textchats
textchat:listRoomTextchatswebsocketList room textchats
textchat:listDirectTextchatswebsocketList direct textchats
textchat:searchTextchatswebsocketSearch textchats
textchat:searchDirectTextchatswebsocketSearch direct textchats
textchat:getDirectCounterwebsocketGet unread direct textchat counter
textchat:sendMessagewebsocketSend textchat message
textchat:sendNewMessagewebsocketSend new textchat message
textchat:editMessagewebsocketEdit textchat message
textchat:blockMessagewebsocketBlock textchat message
textchat:unblockMessagewebsocketUnblock textchat message
textchat:deleteMessagewebsocketDelete textchat message
textchat:restoreMessagewebsocketRestore textchat message
textchat:sendMessageToRoomwebsocketSend textchat message to room
textchat:sendMessageToVideochatwebsocketSend textchat message to videochat
textchat:listMessagesInRoomwebsocketList textchat messages in room
textchat:listMessagesInVideochatwebsocketList textchat messages in videochat
textchat:setTextchatAsImportantwebsocketSet textchat as important
textchat:setTextchatAsNotImportantwebsocketSet textchat as not important
textchat:deleteTextchatwebsocketDelete textchat
textchat:onMessagewebsocketEventOn textchat message
textchat:onMessageEditedwebsocketEventOn textchat message edited
textchat:onMessageBlockedwebsocketEventOn textchat message blocked
textchat:onMessageUnblockedwebsocketEventOn textchat message unblocked
textchat:onMessageDeletedwebsocketEventOn textchat message deleted
textchat:onMessageRestoredwebsocketEventOn textchat message restored
textchat:onMessagesReadwebsocketEventOn textchat messages read
textchat:directCounterUpdatedwebsocketEventOn unread direct textchat count updated
textchat:onMessageInRoomwebsocketEventOn textchat message in room
textchat:onMessageInVideochatwebsocketEventOn textchat message in videochat

Get textchat for room

Method: websocket

Endpoint: textchat:getTextchatForRoom

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api gets/creates textchat for room and subscribes socket to that textchat.

Request:

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

Response:

{
    "data": {
        "textchat": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "textchatMode": string  // room/videochat/prop/direct
            "textchatSource": {  // object textchat is related to
                "roomId": string
                "propId": string
                "videochatId": string
            }
            "textchatSourceType": string  // direct/room/prop/booth/social circle
            "lastMessageTime": timestamp  // timestamp of last message in textchat
            "title": string  // room/prop title, only in case if room/prop textchatMode
            "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get textchat for prop

Method: websocket

Endpoint: textchat:getTextchatForProp

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api gets/creates textchat for prop and subscribes socket to that textchat.

Request:

{
    "data": {
        "roomId": string
        "propId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "textchat": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "textchatMode": string  // room/videochat/prop/direct
            "textchatSource": {  // object textchat is related to
                "roomId": string
                "propId": string
                "videochatId": string
            }
            "textchatSourceType": string  // direct/room/prop/booth/social circle
            "lastMessageTime": timestamp  // timestamp of last message in textchat
            "title": string  // room/prop title, only in case if room/prop textchatMode
            "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get textchat for videochat

Method: websocket

Endpoint: textchat:getTextchatForVideochat

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api gets/creates textchat for videochat and subscribes socket to that textchat.

Request:

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

Response:

{
    "data": {
        "textchat": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "textchatMode": string  // room/videochat/prop/direct
            "textchatSource": {  // object textchat is related to
                "roomId": string
                "propId": string
                "videochatId": string
            }
            "textchatSourceType": string  // direct/room/prop/booth/social circle
            "lastMessageTime": timestamp  // timestamp of last message in textchat
            "title": string  // room/prop title, only in case if room/prop textchatMode
            "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get textchat for user (direct textchat)

Method: websocket

Endpoint: textchat:getTextchatForUser

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api gets/creates direct textchat with user and subscribes socket to that textchat. User can have textchat with himself by putting his own user id to targetUser field.

Request:

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

Response:

{
    "data": {
        "textchat": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "textchatMode": string  // room/videochat/prop/direct
            "textchatSource": {  // object textchat is related to
                "roomId": string
                "propId": string
                "videochatId": string
            }
            "textchatSourceType": string  // direct/room/prop/booth/social circle
            "lastMessageTime": timestamp  // timestamp of last message in textchat
            "title": string  // room/prop title, only in case if room/prop textchatMode
            "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get last textchat message

Method: websocket

Endpoint: textchat:getLastMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns last message of textchat (does not update last read timestamp).

Request:

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

Response:

{
    "data": {
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

List textchat messages

Method: websocket

Endpoint: textchat:listMessages

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api subscribes socket to textchat events and returns list of textchat messages.

Field messageType could be one of:

  • 0 - my messages
  • 1 - user messages
  • 3 - system messages
  • 4 - system json messages

In case of system json message, parsed json is sent in message body:

 
{ 
    "userId": string 
    "userName": string 
    "roomId": string 
    "propId": string 
    "propName": string 
    "eventType": int 
} 

Field event could be one of:

  • 1 - user entered booth
  • 2 - user wrote to booth
  • 3 - user entered social circle
  • 4 - user wrote to social circle

Request:

{
    "data": {
        "textchatId": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "messages": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }]
        "participants": map[string]{ user simple structure }  // dictionary of users who participate in textchat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Mark textchat as read

Method: websocket

Endpoint: textchat:markTextchatAsRead

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api sets lastReadMessage to current time for textchat.

Request:

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

Response:

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

List textchats

Method: websocket

Endpoint: textchat:listTextchats

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns list of all textchats depending on filters.

Filter could be one of the following:

  • important - return textchats marked as important
  • all - return all textchats
  • direct - return direct textchats
  • group - return all non-direct textchats
  • allWithinRoom - return all non-direct textchats within the room
  • rooms - return only room textchats
  • noProps - return all textchats (excluding prop textchats)

Request:

{
    "data": {
        "filter": string
        "roomId": string  // in case if filter is set to 'allWithinRoom'
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "textchats": [{
            "textchat": {
                "id": string
                "created": timestamp
                "updated": timestamp
                "textchatMode": string  // room/videochat/prop/direct
                "textchatSource": {  // object textchat is related to
                    "roomId": string
                    "propId": string
                    "videochatId": string
                }
                "textchatSourceType": string  // direct/room/prop/booth/social circle
                "lastMessageTime": timestamp  // timestamp of last message in textchat
                "title": string  // room/prop title, only in case if room/prop textchatMode
                "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
                "unreadMessageCount": int  // current users' unread message count (direct chat only)
                "lastReadMessageTime": timestamp  // current users' last read message timestamp
                "isImportant": bool  // marked by user or system
            }
            "opponentUser": {  // only in case if textchatMode is direct
                "user": { user simple structure }
                "lastReadMessageTime": timestamp  // opponent users' last read message timestamp
            }
        }]
        "textchatCount": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

List room textchats

Method: websocket

Endpoint: textchat:listRoomTextchats

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns list of textchats in the room (including prop textchats) where user have been participated. Textchats are sorted by last message time, starting from newest.

Request:

{
    "data": {
        "roomId": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "textchats": [{
            "textchat": {
                "id": string
                "created": timestamp
                "updated": timestamp
                "textchatMode": string  // room/videochat/prop/direct
                "textchatSource": {  // object textchat is related to
                    "roomId": string
                    "propId": string
                    "videochatId": string
                }
                "textchatSourceType": string  // direct/room/prop/booth/social circle
                "lastMessageTime": timestamp  // timestamp of last message in textchat
                "title": string  // room/prop title, only in case if room/prop textchatMode
                "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
                "unreadMessageCount": int  // current users' unread message count (direct chat only)
                "lastReadMessageTime": timestamp  // current users' last read message timestamp
                "isImportant": bool  // marked by user or system
            }
            "opponentUser": {  // only in case if textchatMode is direct
                "user": { user simple structure }
                "lastReadMessageTime": timestamp  // opponent users' last read message timestamp
            }
        }]
        "textchatCount": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

List direct textchats

Method: websocket

Endpoint: textchat:listDirectTextchats

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns list of direct textchats where user have been participated. Textchats are sorted by last message time, starting from newest.

Request:

{
    "data": {
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "textchats": [{
            "textchat": {
                "id": string
                "created": timestamp
                "updated": timestamp
                "textchatMode": string  // room/videochat/prop/direct
                "textchatSource": {  // object textchat is related to
                    "roomId": string
                    "propId": string
                    "videochatId": string
                }
                "textchatSourceType": string  // direct/room/prop/booth/social circle
                "lastMessageTime": timestamp  // timestamp of last message in textchat
                "title": string  // room/prop title, only in case if room/prop textchatMode
                "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
                "unreadMessageCount": int  // current users' unread message count (direct chat only)
                "lastReadMessageTime": timestamp  // current users' last read message timestamp
                "isImportant": bool  // marked by user or system
            }
            "opponentUser": {  // only in case if textchatMode is direct
                "user": { user simple structure }
                "lastReadMessageTime": timestamp  // opponent users' last read message timestamp
            }
        }]
        "textchatCount": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search textchats

Method: websocket

Endpoint: textchat:searchTextchats

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns list of all textchats depending on filters.

Filter could be one of the following:

  • important - return textchats marked as important
  • all - return all textchats
  • direct - return direct textchats
  • group - return all non-direct textchats
  • allWithinRoom - return all non-direct textchats within the room
  • rooms - return only room textchats
  • noProps - return all textchats (excluding prop textchats)

Request:

{
    "data": {
        "query": string
        "filter": string
        "roomId": string  // in case if filter is set to 'allWithinRoom'
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "textchats": [{
            "textchat": {
                "id": string
                "created": timestamp
                "updated": timestamp
                "textchatMode": string  // room/videochat/prop/direct
                "textchatSource": {  // object textchat is related to
                    "roomId": string
                    "propId": string
                    "videochatId": string
                }
                "textchatSourceType": string  // direct/room/prop/booth/social circle
                "lastMessageTime": timestamp  // timestamp of last message in textchat
                "title": string  // room/prop title, only in case if room/prop textchatMode
                "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
                "unreadMessageCount": int  // current users' unread message count (direct chat only)
                "lastReadMessageTime": timestamp  // current users' last read message timestamp
                "isImportant": bool  // marked by user or system
            }
            "opponentUser": {  // only in case if textchatMode is direct
                "user": { user simple structure }
                "lastReadMessageTime": timestamp  // opponent users' last read message timestamp
            }
        }]
        "textchatCount": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search direct textchats

Method: websocket

Endpoint: textchat:searchDirectTextchats

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns list of direct textchats where user have been participated. Textchats are filtered by opponent first or last name parts present in search query. Textchats are sorted by last message time, starting from newest.

Request:

{
    "data": {
        "query": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "textchats": [{
            "textchat": {
                "id": string
                "created": timestamp
                "updated": timestamp
                "textchatMode": string  // room/videochat/prop/direct
                "textchatSource": {  // object textchat is related to
                    "roomId": string
                    "propId": string
                    "videochatId": string
                }
                "textchatSourceType": string  // direct/room/prop/booth/social circle
                "lastMessageTime": timestamp  // timestamp of last message in textchat
                "title": string  // room/prop title, only in case if room/prop textchatMode
                "thumbnail": string  // room/prop thumbnail resource id, only in case if room/prop textchatMode
                "unreadMessageCount": int  // current users' unread message count (direct chat only)
                "lastReadMessageTime": timestamp  // current users' last read message timestamp
                "isImportant": bool  // marked by user or system
            }
            "opponentUser": {  // only in case if textchatMode is direct
                "user": { user simple structure }
                "lastReadMessageTime": timestamp  // opponent users' last read message timestamp
            }
        }]
        "textchatCount": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get unread direct textchat counter

Method: websocket

Endpoint: textchat:getDirectCounter

DEPRECATED

Description: Deprecated, Use Channel API instead .

Api returns amount of unread direct textchat channels.

Request:

{ empty }

Response:

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

Send textchat message

Method: websocket

Endpoint: textchat:sendMessage

DEPRECATED

Description: This endpoint is deprecated as it sends new message event to initiator socket, use textchat:sendNewMessage instead.

Request:

{
    "data": {
        "textchatId": string
        "message": string
        "messageType": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Send new textchat message

Method: websocket

Endpoint: textchat:sendNewMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

{
    "data": {
        "textchatId": string
        "message": string
        "messageType": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Edit textchat message

Method: websocket

Endpoint: textchat:editMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

{
    "data": {
        "textchatId": string
        "messageId": string
        "message": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Block textchat message

Method: websocket

Endpoint: textchat:blockMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

{
    "data": {
        "textchatId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Unblock textchat message

Method: websocket

Endpoint: textchat:unblockMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

{
    "data": {
        "textchatId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Delete textchat message

Method: websocket

Endpoint: textchat:deleteMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

{
    "data": {
        "textchatId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Restore textchat message

Method: websocket

Endpoint: textchat:restoreMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

{
    "data": {
        "textchatId": string
        "messageId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Send textchat message to room

Method: websocket

Endpoint: textchat:sendMessageToRoom

DEPRECATED

Description: Api function is deprecated, use textchat:getTextchatForRoom and textchat:sendMessage instead.

Request:

{
    "data": {
        "roomId": string
        "message": string
        "messageType": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Send textchat message to videochat

Method: websocket

Endpoint: textchat:sendMessageToVideochat

DEPRECATED

Description: Api function is deprecated, use textchat:getTextchatForVideochat and textchat:sendMessage instead.

Request:

{
    "data": {
        "videochatId": string
        "message": string
        "messageType": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

List textchat messages in room

Method: websocket

Endpoint: textchat:listMessagesInRoom

DEPRECATED

Description: Api function is deprecated, use textchat:getTextchatForRoom and textchat:listMessages instead.

Request:

{
    "data": {
        "roomId": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "messages": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }]
        "participants": map[string]{ user simple structure }  // dictionary of users who participate in textchat
    }
    "error": { "status": bool, "code": int, "message": string }
}

List textchat messages in videochat

Method: websocket

Endpoint: textchat:listMessagesInVideochat

DEPRECATED

Description: Api function is deprecated, use textchat:getTextchatForVideochat and textchat:listMessages instead.

Request:

{
    "data": {
        "videochatId": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "messages": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
        }]
        "participants": map[string]{ user simple structure }  // dictionary of users who participate in textchat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Set textchat as important

Method: websocket

Endpoint: textchat:setTextchatAsImportant

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

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

Response:

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

Set textchat as not important

Method: websocket

Endpoint: textchat:setTextchatAsNotImportant

DEPRECATED

Description: Deprecated, Use Channel API instead .

Request:

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

Response:

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

Delete textchat

Method: websocket

Endpoint: textchat:deleteTextchat

DEPRECATED

Description: Deprecated, Use Channel API instead .

API deletes direct textchat.

Request:

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

Response:

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

On textchat message

Event: textchat:onMessage

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat message edited

Event: textchat:onMessageEdited

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat message blocked

Event: textchat:onMessageBlocked

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat message unblocked

Event: textchat:onMessageUnblocked

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat message deleted

Event: textchat:onMessageDeleted

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat message restored

Event: textchat:onMessageRestored

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat messages read

Event: textchat:onMessagesRead

DEPRECATED

Description: Deprecated, Use Channel API instead .

Data:

{
    "data": {
        "textchatId": string
        "userId": string
        "lastReadMessageTime": timestamp
    }
    "error": { "status": bool, "code": int, "message": string }
}

On unread direct textchat count updated

Event: textchat:directCounterUpdated

DEPRECATED

Description: Deprecated, Use Channel API instead .

Event is triggered when counter of unread direct textchat channels is updated.

Data:

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

On textchat message in room

Event: textchat:onMessageInRoom

DEPRECATED

Description: Api event is deprecated, use textchat:onMessage instead.

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On textchat message in videochat

Event: textchat:onMessageInVideochat

DEPRECATED

Description: Api event is deprecated, use textchat:onMessage instead.

Data:

{
    "data": {
        "textchatId": string
        "textchatMode": string
        "message": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "userId": string
            "messageBody": string
            "messageType": int
            "isBlocked": bool
            "isDeleted": bool
            "user": { user simple structure }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Models


User Simple

{
    "id": string
    "firstName": string
    "lastName": string
    "privacyMode": int  // 0 - Default, 1 - Incognito
    "avatar": string
    "avatar3D": {  // field is not returned if empty
        "assetId": string
        "assetSkins": map[string]string  // map of selected skins per variants
        "avatarUrl": string  // url to gbl file (Ready Player Me)
        "avatarUserId": string  // user id for session recovery (Ready Player Me)
    }
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}