Skip to content
On this page

Videochat API

EndpointMethodDescription
/api/v0/rpc/videochat.setMicrophoneStatusjsonRpcSet microphone status
videochat:subscribewebsocketVideochat subscribe
videochat:unsubscribewebsocketVideochat unsubscribe
videochat:subscribeToRoomVideochatswebsocketSubscribe to room videochats
videochat:unsubscribeFromRoomVideochatswebsocketUnsubscribe from room videochats
videochat:subscribeToPlaygroundVideochatwebsocketSubscribe to playground videochat: deprecated
videochat:unsubscribeFromPlaygroundVideochatwebsocketUnsubscribe from playground videochat
videochat:statuswebsocketVideochat status: deprecated
videochat:getStatuswebsocketVideochat status
videochat:getTokenForVideochatwebsocketGet token for new videochat
videochat:getTokenForPropConferencewebsocketGet token for prop conference
videochat:getTokenForDirectVideochatwebsocketGet token for direct videochat
videochat:getTokenForPersonalConferencewebsocketGet token for personal conference
videochat:getTokenForPlaygroundVideochatwebsocketGet token for playground videochat
videochat:getTokenForSpeedDatingVideochatwebsocketGet token for speed dating videochat
videochat:getTokenwebsocketGet token for videochat
videochat:getAdditionalTokenForVideochatwebsocketGet additional token for videochat
videochat:getListenerTokenForVideochatwebsocketGet listener token for videochat
videochat:onConnectionwebsocketOn participant connected to videochat
videochat:onDisconnectionwebsocketOn participant disconnected from videochat
videochat:endVideochatwebsocketEnd videochat
videochat:userGoesToBackgroundModewebsocketVideochat user goes to background mode
videochat:userReturnsFromBackgroundModewebsocketVideochat user returns from background mode
videochat:changeParticipantPermissionswebsocketChange videochat participant permissions
videochat:requestConferencePromotionwebsocketRequest conference promotion
videochat:declineConferencePromotionwebsocketDecline conference promotion
videochat:startScreenSharewebsocketStart videochat screen share
videochat:stopScreenSharewebsocketStop videochat screen share
videochat:muteAllwebsocketVideochat mute all
videochat:unmuteAllwebsocketVideochat unmute all
videochat:setMicrophoneStatuswebsocketSet microphone status
videochat:setHandStatuswebsocketSet hand status
videochat:setPresenterOnlyModewebsocketSet presenter only mode
videochat:removeVideoStreamwebsocketRemove videochat video stream
videochat:turnOffUserOptionwebsocketTurn off user option
videochat:startLiveStreamwebsocketVideochat start live stream
videochat:stopLiveStreamwebsocketVideochat stop live stream
videochat:getVideochatInfoOfRoomPropswebsocketGet videochat info of room props
videochat:broadcastActionwebsocketVideochat broadcast action
videochat:requestLastBroadcastActionwebsocketVideochat request last broadcast action
videochat:setCustomDatawebsocketSet videochat custom data
videochat:getCustomDatawebsocketGet videochat custom data
videochat:searchRoomsWithActiveVideochatwebsocketSearch rooms with active videochat
videochat:startedwebsocketEventVideochat started event
videochat:videochatStartedwebsocketEventVideochat started event: deprecated
videochat:videochatEndedwebsocketEventVideochat ended event
videochat:videochatStatusUpdatedwebsocketEventVideochat status updated event
videochat:identityConnectedwebsocketEventVideochat identity connected event
videochat:identityDisconnectedwebsocketEventVideochat identity disconnected event
videochat:participantConnectedwebsocketEventParticipant connected event
videochat:participantDisconnectedwebsocketEventParticipant disconnected event
videochat:participantUpdatedwebsocketEventParticipant updated event
videochat:conferencePromotionRequestedwebsocketEventConference promotion requested event
videochat:conferencePromotionDeclinedwebsocketEventConference promotion declined event
videochat:participantIdentityUpdatedwebsocketEventParticipant identity updated event
videochat:userInvitedToVideochatwebsocketEventUser invited to videochat event
videochat:shareScreenStartedwebsocketEventShare screen started event
videochat:shareScreenStoppedwebsocketEventShare screen stopped event
videochat:muteAllwebsocketEventVideochat mute all event
videochat:unmuteAllwebsocketEventVideochat unmute all event
videochat:removeVideoStreamwebsocketEventRemove videochat video stream event
videochat:turnOffUserOptionwebsocketEventVideochat turn off option event
videochat:liveStreamStartedwebsocketEventVideochat live stream started event
videochat:liveStreamStoppedwebsocketEventVideochat live stream stopped event
videochat:propVideochatCountChangedwebsocketEventProp videochat count changed event
videochat:actionwebsocketEventVideochat action event
videochat:customDataUpdatedwebsocketEventVideochat custom data updated event

Set microphone status

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/rpc/videochat.setMicrophoneStatus

Description: Indicate that user has changed microphone status.

Statuses:

  • 0 - Off

  • 1 - On

  • 2 - Not Available

Headers:

X-Session-Id: sessionToken

Request:

{
    "videochatId": string
    "identity": string
    "microphoneStatus": int
    "updateDate": timestamp
}

Response:

{ empty }

Videochat subscribe

Method: websocket

Endpoint: videochat:subscribe

Description: Subscribes user socket to videochat broadcasting channel.

Request:

{
    "data": {
        "videochatId": string
        "roomId": string  // if videochatId is empty
        "propId": string  // if videochatId is empty (requires roomId)
        "playgroundId": string  // if videochatId is empty (requires roomId)
        "groupId": string  // if videochatId is empty
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Videochat unsubscribe

Method: websocket

Endpoint: videochat:unsubscribe

Description: Subscribes user socket to videochat broadcasting channel.

Request:

{
    "data": {
        "videochatId": string
        "roomId": string  // if videochatId is empty
        "propId": string  // if videochatId is empty (requires roomId)
        "playgroundId": string  // if videochatId is empty (requires roomId)
        "groupId": string  // if videochatId is empty
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Subscribe to room videochats

Method: websocket

Endpoint: videochat:subscribeToRoomVideochats

Description: Subscribes user socket to all room videochat broadcasting channels.

Request:

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

Response:

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

Unsubscribe from room videochats

Method: websocket

Endpoint: videochat:unsubscribeFromRoomVideochats

Description: Unsubscribes user socket from all room videochat broadcasting channels.

Request:

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

Response:

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

Subscribe to playground videochat: deprecated

Method: websocket

Endpoint: videochat:subscribeToPlaygroundVideochat

DEPRECATED

Description: Subscribes user socket to playground videochat broadcasting channel.

Request:

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

Response:

{
    "data": {
        "videochat": {
            "videochatSourceMode": string  // room/prop/direct/group/playground/speedDating
            "videochatSource": {  // id of object textchat is related to
                "networkId": string
                "roomId": string
                "propId": string
                "userId": string
                "groupId": string
                "playgroundId": string
                "speedDatingId": string
            }
            "videochatId": string
            "videochatMode": string  // videochat/conference/networkConference
            "videochatEngine": string  // twilio/agora/livekit
            "videochatName": string  // name from room/prop
            "room": string  // DEPRECATED, use currentRoomId instead
            "currentRoomId": string  // room where the videochat is being held
            "originalRoomId": string  // room where the videochat was started
            "isActive": bool
            "isPresentationActive": bool  // videochat has active presentation ongoing
            "isPresenterOnlyMode": bool  // show only presenter in videochat
            "isStreamEnabled": bool  // videochat could be could be streamed to listeners
            "streamPlaybackUrl": string  // videochat live stream playback url
            "isMuted": bool  // participants are muted by moderator
            "videochatLimit": int  // amount of identities allowed in videochat (0 means unlimited)
            "participants": [{
                "user": { user simple structure }
                "userId": string
                "seqNumber": int  // sequential number, unique for each user within videochat
                "identityModels": [{  // list of active videochat identity models
                    "identity": string  // represents single user connection to videochat
                    "uid": int  // numeric identity for agora
                    "seqNumber": int  // sequential number, unique for each identity within videochat
                    "lastUpdated": timestamp  // status last updated timestamp
                    "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                    "microphoneStatus": int  // show device microphone status
                    "handStatus": int  // show if user wants to attract attention of the presenter/moderator
                }]
                "identities": [ string ]  // DEPRECATED
                "uids": [ int ]  // DEPRECATED
                "permissions": {
                    "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                    "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                    "isPanelist": bool  // temporary moderator of the videochat
                    "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                    "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                    "isPromoted": bool  // have permission to participate and speak in the videochat
                    "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                    "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
                }
            }]
            "counter": int  // total users in videochat
            "promotionRequests": [ string ]  // list of user ids
            "shareScreenIdentity": {  // for agora screen sharing
                "userId": string
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
            }
            "actionState": map[string]{ custom structure }  // state of videochat actions
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Unsubscribe from playground videochat

Method: websocket

Endpoint: videochat:unsubscribeFromPlaygroundVideochat

DEPRECATED

Description: Unsubscribes user socket from playground videochat broadcasting channel.

Request:

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

Response:

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

Videochat status: deprecated

Method: websocket

Endpoint: videochat:status

DEPRECATED

Request:

{
    "data": {
        "videochatId": string  // get videochat status by its id
        "room": string  // get room videochat status, when videochatId is unknown
        "prop": string  // get prop videochat status, when videochatId is unknown
        "groupId": string  // get group videochat status, when videochatId is unknown
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "videochat": {
            "videochatSourceMode": string  // room/prop/direct/group/playground/speedDating
            "videochatSource": {  // id of object textchat is related to
                "networkId": string
                "roomId": string
                "propId": string
                "userId": string
                "groupId": string
                "playgroundId": string
                "speedDatingId": string
            }
            "videochatId": string
            "videochatMode": string  // videochat/conference/networkConference
            "videochatEngine": string  // twilio/agora/livekit
            "videochatName": string  // name from room/prop
            "room": string  // DEPRECATED, use currentRoomId instead
            "currentRoomId": string  // room where the videochat is being held
            "originalRoomId": string  // room where the videochat was started
            "isActive": bool
            "isPresentationActive": bool  // videochat has active presentation ongoing
            "isPresenterOnlyMode": bool  // show only presenter in videochat
            "isStreamEnabled": bool  // videochat could be could be streamed to listeners
            "streamPlaybackUrl": string  // videochat live stream playback url
            "isMuted": bool  // participants are muted by moderator
            "videochatLimit": int  // amount of identities allowed in videochat (0 means unlimited)
            "participants": [{
                "user": { user simple structure }
                "userId": string
                "seqNumber": int  // sequential number, unique for each user within videochat
                "identityModels": [{  // list of active videochat identity models
                    "identity": string  // represents single user connection to videochat
                    "uid": int  // numeric identity for agora
                    "seqNumber": int  // sequential number, unique for each identity within videochat
                    "lastUpdated": timestamp  // status last updated timestamp
                    "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                    "microphoneStatus": int  // show device microphone status
                    "handStatus": int  // show if user wants to attract attention of the presenter/moderator
                }]
                "identities": [ string ]  // DEPRECATED
                "uids": [ int ]  // DEPRECATED
                "permissions": {
                    "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                    "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                    "isPanelist": bool  // temporary moderator of the videochat
                    "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                    "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                    "isPromoted": bool  // have permission to participate and speak in the videochat
                    "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                    "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
                }
            }]
            "counter": int  // total users in videochat
            "promotionRequests": [ string ]  // list of user ids
            "shareScreenIdentity": {  // for agora screen sharing
                "userId": string
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
            }
            "actionState": map[string]{ custom structure }  // state of videochat actions
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat status

Method: websocket

Endpoint: videochat:getStatus

Request:

{
    "data": {
        "videochatId": string
        "roomId": string  // if videochatId is empty
        "propId": string  // if videochatId is empty (requires roomId)
        "playgroundId": string  // if videochatId is empty (requires roomId)
        "groupId": string  // if videochatId is empty
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "videochat": {
            "videochatSourceMode": string  // room/prop/direct/group/playground/speedDating
            "videochatSource": {  // id of object textchat is related to
                "networkId": string
                "roomId": string
                "propId": string
                "userId": string
                "groupId": string
                "playgroundId": string
                "speedDatingId": string
            }
            "videochatId": string
            "videochatMode": string  // videochat/conference/networkConference
            "videochatEngine": string  // twilio/agora/livekit
            "videochatName": string  // name from room/prop
            "room": string  // DEPRECATED, use currentRoomId instead
            "currentRoomId": string  // room where the videochat is being held
            "originalRoomId": string  // room where the videochat was started
            "isActive": bool
            "isPresentationActive": bool  // videochat has active presentation ongoing
            "isPresenterOnlyMode": bool  // show only presenter in videochat
            "isStreamEnabled": bool  // videochat could be could be streamed to listeners
            "streamPlaybackUrl": string  // videochat live stream playback url
            "isMuted": bool  // participants are muted by moderator
            "videochatLimit": int  // amount of identities allowed in videochat (0 means unlimited)
            "identities": [{
                "userId": string
                "permissions": {
                    "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                    "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                    "isPanelist": bool  // temporary moderator of the videochat
                    "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                    "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                    "isPromoted": bool  // have permission to participate and speak in the videochat
                    "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                    "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
                }
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "counter": int  // total users in videochat
            "promotionRequests": [ string ]  // list of user ids
            "shareScreenIdentity": {  // for agora screen sharing
                "userId": string
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
            }
            "actionState": map[string]{ custom structure }  // state of videochat actions
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for new videochat

Method: websocket

Endpoint: videochat:getTokenForVideochat

Description: Api returns identity and token for room or group videochat. Creates new videochat if it does not exist.

Token should be used only once. Each time client wants to connect to videochat, it should request new token.

Api could return following errors:

  • 10002 - Not enough videochat permissions
  • 10009 - Participant limit reached
  • 10010 - Videochat not started by manager

Request:

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

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for prop conference

Method: websocket

Endpoint: videochat:getTokenForPropConference

Description: Api returns identity and token for prop videochat. Creates new prop conference if it does not exist. See videochat:getTokenForVideochat for more info on api restrictions.

Request:

{
    "data": {
        "roomId": string
        "propId": string
        "settings": {
            "videochatLimit": int  // amount of identities allowed in videochat (0 means default value)
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for direct videochat

Method: websocket

Endpoint: videochat:getTokenForDirectVideochat

Description: Api creates new direct videochat with provided participants, and returns identity and token. In order to connect to existing videochat user should use videochat:getToken. See videochat:getTokenForVideochat for more info on api restrictions.

Request:

{
    "data": {
        "participants": [ string ]  // list of user ids
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for personal conference

Method: websocket

Endpoint: videochat:getTokenForPersonalConference

Description: Api creates new personal conference, and returns identity and token. Any other user can connect to that conference using videochat:getToken api. See videochat:getTokenForVideochat for more info on api restrictions.

Request:

{ empty }

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for playground videochat

Method: websocket

Endpoint: videochat:getTokenForPlaygroundVideochat

Description: Api creates new playground videochat, and returns identity and token. In order to connect to existing videochat user should use videochat:getToken. See videochat:getTokenForVideochat for more info on api restrictions.

Request:

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

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for speed dating videochat

Method: websocket

Endpoint: videochat:getTokenForSpeedDatingVideochat

Description: Api creates new speedDating videochat, and returns identity and token. In order to connect to existing videochat user should use videochat:getToken. See videochat:getTokenForVideochat for more info on api restrictions.

Request:

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

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get token for videochat

Method: websocket

Endpoint: videochat:getToken

Description: Api returns identity and token for existing videochat. Token should be used only once. Each time client wants to connect to videochat, it should request new token.

Request:

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

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "room": string
        "identity": string
        "uid": int  // numeric identity for agora
        "token": string
        "sharedSecret": string  // shared secret for livekit E2E
        "user": { user simple structure }
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get additional token for videochat

Method: websocket

Endpoint: videochat:getAdditionalTokenForVideochat

Description: Api returns additional identity and token for videochat. Additional identity is used for Agora screen sharing, as it does not support multitrack. Only one additional identity could be generated for user:socket pair.

Request:

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

Response:

{
    "data": {
        "identity": string  // different from original identity
        "uid": int  // numeric identity for agora / different from original uid
        "token": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get listener token for videochat

Method: websocket

Endpoint: videochat:getListenerTokenForVideochat

Description: Api returns listener token for existing videochat. Videochat listener doesn't participate in videochat, but can watch/listen its stream.

Request:

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

Response:

{
    "data": {
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatAppId": string  // appId for agora
        "videochatUrl": string  // videochat server url for livekit
        "token": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

On participant connected to videochat

Method: websocket

Endpoint: videochat:onConnection

Description: Client informs server that it is connected to the videochat. This event is mentioned to duplicate (ensure that at least one is received) events from videochat engine server (twilio/agora/livekit).

Request:

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

Response:

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

On participant disconnected from videochat

Method: websocket

Endpoint: videochat:onDisconnection

Description: Client informs server that it is disconnected from the videochat. This event is mentioned to duplicate (ensure that at least one is received) events from videochat engine server (twilio/agora/livekit).

Request:

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

Response:

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

End videochat

Method: websocket

Endpoint: videochat:endVideochat

Description: Api ends videochat. Available for direct call participants and conference moderators.

Request:

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

Response:

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

Videochat user goes to background mode

Method: websocket

Endpoint: videochat:userGoesToBackgroundMode

Description: Sets videochat identity connection status to in-background. If user is in background mode and socket disconnects:

  • Keep user in videochat participant list.

  • Keep user role (presenter, co-presenter, etc).

  • Do not send videochat:participantDisconnected event.

Request:

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

Response:

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

Videochat user returns from background mode

Method: websocket

Endpoint: videochat:userReturnsFromBackgroundMode

Description:

  • Sets videochat identity connection status to active.

  • Changes videochat identity socket to a new value.

  • Subscribes new socket to videochat events.

Request:

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

Response:

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

Change videochat participant permissions

Method: websocket

Endpoint: videochat:changeParticipantPermissions

Description: Room owners are videochat moderators by default. Moderator can add any permissions to other users. Presenter can transfer presentation permissions or promote/demote participant voice/video. Only one participant with presenter permission can be presented in the videochat.

Request:

{
    "data": {
        "videochatId": string
        "room": string  // deprecated, use videochatId instead
        "targetUser": string
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Request conference promotion

Method: websocket

Endpoint: videochat:requestConferencePromotion

Description: Videochat participant can request promotion (in order to ask question to presenter).

Request:

{
    "data": {
        "videochatId": string
        "room": string  // deprecated, use videochatId instead
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Decline conference promotion

Method: websocket

Endpoint: videochat:declineConferencePromotion

Description: Promotion request could be declined by moderator, presenter or by user himself.

Request:

{
    "data": {
        "videochatId": string
        "room": string  // deprecated, use videochatId instead
        "targetUser": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Start videochat screen share

Method: websocket

Endpoint: videochat:startScreenShare

Description: Notify server and other participants on screen sharing start.

Request:

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

Response:

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

Stop videochat screen share

Method: websocket

Endpoint: videochat:stopScreenShare

Description: Notify server and other participants on screen sharing stop.

Request:

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

Response:

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

Videochat mute all

Method: websocket

Endpoint: videochat:muteAll

Description: Request all participant identities (except initiator) to mute microphones. Server doesn't change microphone statuses, but sets isMuted in videochat model.

Request:

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

Response:

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

Videochat unmute all

Method: websocket

Endpoint: videochat:unmuteAll

Description: Request previously muted identities to unmute microphones.

Request:

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

Response:

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

Set microphone status

Method: websocket

Endpoint: videochat:setMicrophoneStatus

Description: Indicate that user has changed microphone status.

Statuses:

  • 0 - Off

  • 1 - On

  • 2 - Not Available

Request:

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

Response:

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

Set hand status

Method: websocket

Endpoint: videochat:setHandStatus

Description: Indicate that user has changed hand status.

Statuses:

  • 0 - Off

  • 1 - Low

  • 2 - Raise

Request:

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

Response:

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

Set presenter only mode

Method: websocket

Endpoint: videochat:setPresenterOnlyMode

Description: Indicate that only presenter should be shown to other users (if set to true).

Request:

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

Response:

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

Remove videochat video stream

Method: websocket

Endpoint: videochat:removeVideoStream

Description: Indicate that videochat participant has removed video stream. This api is needed because Agora iOS SDK doesn't receive event when user repeatedly removes video stream.

Request:

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

Response:

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

Turn off user option

Method: websocket

Endpoint: videochat:turnOffUserOption

Description: Videochat moderator or presenter can call this api to ask target client to turn off some of his options.

Videochat options:

  • 0 - All

  • 1 - Camera

  • 2 - Microphone

  • 3 - Screen Share

  • 4 - Raised Hand

Request:

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

Response:

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

Videochat start live stream

Method: websocket

Endpoint: videochat:startLiveStream

Description: Videochat moderator can call this api to start MUX live stream.

Request:

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

Response:

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

Videochat stop live stream

Method: websocket

Endpoint: videochat:stopLiveStream

Description: Videochat moderator can call this api to stop MUX live stream.

Request:

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

Response:

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

Get videochat info of room props

Method: websocket

Endpoint: videochat:getVideochatInfoOfRoomProps

Description: Get information of all running prop videochats in the room.

Request:

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

Response:

{
    "data": {
        "videochats": [{
            "videochatId": string
            "propId": string
            "participantCount": int
            "videochatLimit": int
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat broadcast action

Method: websocket

Endpoint: videochat:broadcastAction

Description: Api broadcasts action (videochat:action) to all participants in the videochat. Same as videochat:sync:presentationAction but doesn't require presentation to be started.

Request:

{
    "data": {
        "videochatId": string
        "roomId": string
        "route": string
        "action": string
        "dataKey": string  // if provided - data will be stored in videochat action state
        "data": map[string]{ custom structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Videochat request last broadcast action

Method: websocket

Endpoint: videochat:requestLastBroadcastAction

Description: Request last broadcast action. If event exists, its data will be sent to socket. If event doesn't exist, nothing happens. Same as videochat:sync:requestLastSyncEvent but doesn't require presentation to be started.

Request:

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

Response:

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

Set videochat custom data

Method: websocket

Endpoint: videochat:setCustomData

Description: Api sets custom data to videochat and broadcasts it to all participants.

Request:

{
    "data": {
        "videochatId": string
        "data": map[string]{ custom structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Get videochat custom data

Method: websocket

Endpoint: videochat:getCustomData

Description: Api returns videochat custom data.

Request:

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

Response:

{
    "data": {
        "videochatId": string
        "data": map[string]{ custom structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search rooms with active videochat

Method: websocket

Endpoint: videochat:searchRoomsWithActiveVideochat

Description: Api returns list of rooms that have currently active videochats.

Request:

{
    "data": {
        "filter": string  // explorer/public/private/shared/favourite
        "query": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "rooms": [{
            "id": string
            "name": string
            "tags": [ string ]
            "thumbnailId": string
            "subscriptionStatus": string
            "ownerIds": [ string ]
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat started event

Event: videochat:started

Data:

{
    "data": {
        "videochatSourceMode": string  // room/prop/direct/group/playground/speedDating
        "videochatSource": {  // id of object textchat is related to
            "networkId": string
            "roomId": string
            "propId": string
            "userId": string
            "groupId": string
            "playgroundId": string
            "speedDatingId": string
        }
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatName": string  // name from room/prop
        "room": string  // DEPRECATED, use currentRoomId instead
        "currentRoomId": string  // room where the videochat is being held
        "originalRoomId": string  // room where the videochat was started
        "isActive": bool
        "isPresentationActive": bool  // videochat has active presentation ongoing
        "isPresenterOnlyMode": bool  // show only presenter in videochat
        "isStreamEnabled": bool  // videochat could be could be streamed to listeners
        "streamPlaybackUrl": string  // videochat live stream playback url
        "isMuted": bool  // participants are muted by moderator
        "videochatLimit": int  // amount of identities allowed in videochat (0 means unlimited)
        "identities": [{
            "userId": string
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
            "identity": string  // represents single user connection to videochat
            "uid": int  // numeric identity for agora
            "seqNumber": int  // sequential number, unique for each identity within videochat
            "lastUpdated": timestamp  // status last updated timestamp
            "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
            "microphoneStatus": int  // show device microphone status
            "handStatus": int  // show if user wants to attract attention of the presenter/moderator
        }]
        "counter": int  // total users in videochat
        "promotionRequests": [ string ]  // list of user ids
        "shareScreenIdentity": {  // for agora screen sharing
            "userId": string
            "identity": string  // represents single user connection to videochat
            "uid": int  // numeric identity for agora
        }
        "actionState": map[string]{ custom structure }  // state of videochat actions
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat started event: deprecated

Event: videochat:videochatStarted

DEPRECATED

Data:

{
    "data": {
        "videochatSourceMode": string  // room/prop/direct/group/playground/speedDating
        "videochatSource": {  // id of object textchat is related to
            "networkId": string
            "roomId": string
            "propId": string
            "userId": string
            "groupId": string
            "playgroundId": string
            "speedDatingId": string
        }
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatName": string  // name from room/prop
        "room": string  // DEPRECATED, use currentRoomId instead
        "currentRoomId": string  // room where the videochat is being held
        "originalRoomId": string  // room where the videochat was started
        "isActive": bool
        "isPresentationActive": bool  // videochat has active presentation ongoing
        "isPresenterOnlyMode": bool  // show only presenter in videochat
        "isStreamEnabled": bool  // videochat could be could be streamed to listeners
        "streamPlaybackUrl": string  // videochat live stream playback url
        "isMuted": bool  // participants are muted by moderator
        "videochatLimit": int  // amount of identities allowed in videochat (0 means unlimited)
        "participants": [{
            "user": { user simple structure }
            "userId": string
            "seqNumber": int  // sequential number, unique for each user within videochat
            "identityModels": [{  // list of active videochat identity models
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "identities": [ string ]  // DEPRECATED
            "uids": [ int ]  // DEPRECATED
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
        }]
        "counter": int  // total users in videochat
        "promotionRequests": [ string ]  // list of user ids
        "shareScreenIdentity": {  // for agora screen sharing
            "userId": string
            "identity": string  // represents single user connection to videochat
            "uid": int  // numeric identity for agora
        }
        "actionState": map[string]{ custom structure }  // state of videochat actions
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat ended event

Event: videochat:videochatEnded

Data:

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

Videochat status updated event

Event: videochat:videochatStatusUpdated

Data:

{
    "data": {
        "videochatSourceMode": string  // room/prop/direct/group/playground/speedDating
        "videochatSource": {  // id of object textchat is related to
            "networkId": string
            "roomId": string
            "propId": string
            "userId": string
            "groupId": string
            "playgroundId": string
            "speedDatingId": string
        }
        "videochatId": string
        "videochatMode": string  // videochat/conference/networkConference
        "videochatEngine": string  // twilio/agora/livekit
        "videochatName": string  // name from room/prop
        "room": string  // DEPRECATED, use currentRoomId instead
        "currentRoomId": string  // room where the videochat is being held
        "originalRoomId": string  // room where the videochat was started
        "isActive": bool
        "isPresentationActive": bool  // videochat has active presentation ongoing
        "isPresenterOnlyMode": bool  // show only presenter in videochat
        "isStreamEnabled": bool  // videochat could be could be streamed to listeners
        "streamPlaybackUrl": string  // videochat live stream playback url
        "isMuted": bool  // participants are muted by moderator
        "videochatLimit": int  // amount of identities allowed in videochat (0 means unlimited)
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat identity connected event

Event: videochat:identityConnected

Description: Event is triggered when user identity is connected to videochat.

Data:

{
    "data": {
        "videochatId": string
        "participantCount": int  // total users in videochat
        "userId": string
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
        "identity": string  // represents single user connection to videochat
        "uid": int  // numeric identity for agora
        "seqNumber": int  // sequential number, unique for each identity within videochat
        "lastUpdated": timestamp  // status last updated timestamp
        "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
        "microphoneStatus": int  // show device microphone status
        "handStatus": int  // show if user wants to attract attention of the presenter/moderator
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat identity disconnected event

Event: videochat:identityDisconnected

Description: Event is triggered when user identity is disconnected from videochat.

Data:

{
    "data": {
        "videochatId": string
        "userId": string
        "identity": string
        "participantCount": int  // total users in videochat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Participant connected event

Event: videochat:participantConnected

DEPRECATED

Description: Event is triggered when new user is connected to videochat. When user connects to videochat from second device/tab, videochat:participantUpdated event is triggered instead.

Data:

{
    "data": {
        "videochatId": string
        "room": string
        "participant": {
            "user": { user simple structure }
            "userId": string
            "seqNumber": int  // sequential number, unique for each user within videochat
            "identityModels": [{  // list of active videochat identity models
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "identities": [ string ]  // DEPRECATED
            "uids": [ int ]  // DEPRECATED
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
        }
        "counter": int  // total users in videochat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Participant disconnected event

Event: videochat:participantDisconnected

DEPRECATED

Description: Event is triggered when user is disconnected from videochat. If user has multiple devices/tabs connected to videochat and one of these connections disconnects - videochat:participantUpdated event is triggered instead.

Data:

{
    "data": {
        "videochatId": string
        "room": string
        "participant": {
            "user": { user simple structure }
            "userId": string
            "seqNumber": int  // sequential number, unique for each user within videochat
            "identityModels": [{  // list of active videochat identity models
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "identities": [ string ]  // DEPRECATED
            "uids": [ int ]  // DEPRECATED
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
        }
        "counter": int  // total users in videochat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Participant updated event

Event: videochat:participantUpdated

DEPRECATED

Data:

{
    "data": {
        "videochatId": string
        "room": string
        "participant": {
            "user": { user simple structure }
            "userId": string
            "seqNumber": int  // sequential number, unique for each user within videochat
            "identityModels": [{  // list of active videochat identity models
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "identities": [ string ]  // DEPRECATED
            "uids": [ int ]  // DEPRECATED
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
        }
        "counter": int  // total users in videochat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Conference promotion requested event

Event: videochat:conferencePromotionRequested

Data:

{
    "data": {
        "videochatId": string
        "room": string
        "participant": {
            "user": { user simple structure }
            "userId": string
            "seqNumber": int  // sequential number, unique for each user within videochat
            "identityModels": [{  // list of active videochat identity models
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "identities": [ string ]  // DEPRECATED
            "uids": [ int ]  // DEPRECATED
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
        }
        "counter": int  // total users in videochat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Conference promotion declined event

Event: videochat:conferencePromotionDeclined

Data:

{
    "data": {
        "videochatId": string
        "room": string
        "participant": {
            "user": { user simple structure }
            "userId": string
            "seqNumber": int  // sequential number, unique for each user within videochat
            "identityModels": [{  // list of active videochat identity models
                "identity": string  // represents single user connection to videochat
                "uid": int  // numeric identity for agora
                "seqNumber": int  // sequential number, unique for each identity within videochat
                "lastUpdated": timestamp  // status last updated timestamp
                "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
                "microphoneStatus": int  // show device microphone status
                "handStatus": int  // show if user wants to attract attention of the presenter/moderator
            }]
            "identities": [ string ]  // DEPRECATED
            "uids": [ int ]  // DEPRECATED
            "permissions": {
                "isModerator": bool  // deprecated, use isOwner and isPanelist instead
                "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
                "isPanelist": bool  // temporary moderator of the videochat
                "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
                "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
                "isPromoted": bool  // have permission to participate and speak in the videochat
                "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
                "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
            }
        }
        "counter": int  // total users in videochat
    }
    "error": { "status": bool, "code": int, "message": string }
}

Participant identity updated event

Event: videochat:participantIdentityUpdated

Data:

{
    "data": {
        "videochatId": string
        "userId": string
        "permissions": {
            "isModerator": bool  // deprecated, use isOwner and isPanelist instead
            "isOwner": bool  // owner and moderator of the videochat, cannot be demoted
            "isPanelist": bool  // temporary moderator of the videochat
            "isPresenter": bool  // have permission to make a presentation, only one active presenter per videochat
            "isCoPresenter": bool  // have permission to participate and speak in the videochat, appears near the presenter on the presentation board
            "isPromoted": bool  // have permission to participate and speak in the videochat
            "isParticipant": bool  // have permission to participate in the videochat, can ask for a promotion
            "isListener": bool  // have permission to listen the videochat stream, doesn't participate in actual conversation
        }
        "identity": string  // represents single user connection to videochat
        "uid": int  // numeric identity for agora
        "seqNumber": int  // sequential number, unique for each identity within videochat
        "lastUpdated": timestamp  // status last updated timestamp
        "connectionStatus": int  // show connection status: 1 - active, 2 - in-background
        "microphoneStatus": int  // show device microphone status
        "handStatus": int  // show if user wants to attract attention of the presenter/moderator
    }
    "error": { "status": bool, "code": int, "message": string }
}

User invited to videochat event

Event: videochat:userInvitedToVideochat

Description: Event will be sent to videochat participants when new user is invited to the videochat.

Data:

{
    "data": {
        "videochatId": string
        "invitedUser": { user simple structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Share screen started event

Event: videochat:shareScreenStarted

Data:

{
    "data": {
        "videochatId": string
        "userId": string
        "identity": string  // represents single user connection to videochat
        "uid": int  // numeric identity for agora
    }
    "error": { "status": bool, "code": int, "message": string }
}

Share screen stopped event

Event: videochat:shareScreenStopped

Data:

{
    "data": {
        "videochatId": string
        "userId": string
        "identity": string  // represents single user connection to videochat
        "uid": int  // numeric identity for agora
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat mute all event

Event: videochat:muteAll

Data:

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

Videochat unmute all event

Event: videochat:unmuteAll

Data:

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

Remove videochat video stream event

Event: videochat:removeVideoStream

Data:

{
    "data": {
        "videochatId": string
        "userId": string
        "identity": string  // represents single user connection to videochat
        "uid": int  // numeric identity for agora
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat turn off option event

Event: videochat:turnOffUserOption

Data:

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

Videochat live stream started event

Event: videochat:liveStreamStarted

Data:

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

Videochat live stream stopped event

Event: videochat:liveStreamStopped

Data:

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

Prop videochat count changed event

Event: videochat:propVideochatCountChanged

Data:

{
    "data": {
        "videochatId": string
        "propId": string
        "participantCount": int
        "videochatLimit": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat action event

Event: videochat:action

Data:

{
    "data": {
        "videochatId": string
        "roomId": string
        "route": string
        "action": string
        "dataKey": string  // if provided - data will be stored in videochat action state
        "data": map[string]{ custom structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Videochat custom data updated event

Event: videochat:customDataUpdated

Data:

{
    "data": {
        "videochatId": string
        "data": map[string]{ custom 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
}