Videochat API
| Endpoint | Method | Description |
|---|---|---|
| /api/v0/rpc/videochat.setMicrophoneStatus | jsonRpc | Set microphone status |
| videochat:subscribe | websocket | Videochat subscribe |
| videochat:unsubscribe | websocket | Videochat unsubscribe |
| videochat:subscribeToRoomVideochats | websocket | Subscribe to room videochats |
| videochat:unsubscribeFromRoomVideochats | websocket | Unsubscribe from room videochats |
| websocket | Subscribe to playground videochat: deprecated | |
| websocket | Unsubscribe from playground videochat | |
| websocket | Videochat status: deprecated | |
| videochat:getStatus | websocket | Videochat status |
| videochat:getTokenForVideochat | websocket | Get token for new videochat |
| videochat:getTokenForPropConference | websocket | Get token for prop conference |
| videochat:getTokenForDirectVideochat | websocket | Get token for direct videochat |
| videochat:getTokenForPersonalConference | websocket | Get token for personal conference |
| videochat:getTokenForPlaygroundVideochat | websocket | Get token for playground videochat |
| videochat:getTokenForSpeedDatingVideochat | websocket | Get token for speed dating videochat |
| videochat:getToken | websocket | Get token for videochat |
| videochat:getAdditionalTokenForVideochat | websocket | Get additional token for videochat |
| videochat:getListenerTokenForVideochat | websocket | Get listener token for videochat |
| videochat:onConnection | websocket | On participant connected to videochat |
| videochat:onDisconnection | websocket | On participant disconnected from videochat |
| videochat:endVideochat | websocket | End videochat |
| videochat:userGoesToBackgroundMode | websocket | Videochat user goes to background mode |
| videochat:userReturnsFromBackgroundMode | websocket | Videochat user returns from background mode |
| videochat:changeParticipantPermissions | websocket | Change videochat participant permissions |
| videochat:requestConferencePromotion | websocket | Request conference promotion |
| videochat:declineConferencePromotion | websocket | Decline conference promotion |
| videochat:startScreenShare | websocket | Start videochat screen share |
| videochat:stopScreenShare | websocket | Stop videochat screen share |
| videochat:muteAll | websocket | Videochat mute all |
| videochat:unmuteAll | websocket | Videochat unmute all |
| videochat:setMicrophoneStatus | websocket | Set microphone status |
| videochat:setHandStatus | websocket | Set hand status |
| videochat:setPresenterOnlyMode | websocket | Set presenter only mode |
| videochat:removeVideoStream | websocket | Remove videochat video stream |
| videochat:turnOffUserOption | websocket | Turn off user option |
| videochat:startLiveStream | websocket | Videochat start live stream |
| videochat:stopLiveStream | websocket | Videochat stop live stream |
| videochat:getVideochatInfoOfRoomProps | websocket | Get videochat info of room props |
| videochat:broadcastAction | websocket | Videochat broadcast action |
| videochat:requestLastBroadcastAction | websocket | Videochat request last broadcast action |
| videochat:setCustomData | websocket | Set videochat custom data |
| videochat:getCustomData | websocket | Get videochat custom data |
| videochat:searchRoomsWithActiveVideochat | websocket | Search rooms with active videochat |
| videochat:started | websocketEvent | Videochat started event |
| websocketEvent | Videochat started event: deprecated | |
| videochat:videochatEnded | websocketEvent | Videochat ended event |
| videochat:videochatStatusUpdated | websocketEvent | Videochat status updated event |
| videochat:identityConnected | websocketEvent | Videochat identity connected event |
| videochat:identityDisconnected | websocketEvent | Videochat identity disconnected event |
| websocketEvent | Participant connected event | |
| websocketEvent | Participant disconnected event | |
| websocketEvent | Participant updated event | |
| videochat:conferencePromotionRequested | websocketEvent | Conference promotion requested event |
| videochat:conferencePromotionDeclined | websocketEvent | Conference promotion declined event |
| videochat:participantIdentityUpdated | websocketEvent | Participant identity updated event |
| videochat:userInvitedToVideochat | websocketEvent | User invited to videochat event |
| videochat:shareScreenStarted | websocketEvent | Share screen started event |
| videochat:shareScreenStopped | websocketEvent | Share screen stopped event |
| videochat:muteAll | websocketEvent | Videochat mute all event |
| videochat:unmuteAll | websocketEvent | Videochat unmute all event |
| videochat:removeVideoStream | websocketEvent | Remove videochat video stream event |
| videochat:turnOffUserOption | websocketEvent | Videochat turn off option event |
| videochat:liveStreamStarted | websocketEvent | Videochat live stream started event |
| videochat:liveStreamStopped | websocketEvent | Videochat live stream stopped event |
| videochat:propVideochatCountChanged | websocketEvent | Prop videochat count changed event |
| videochat:action | websocketEvent | Videochat action event |
| videochat:customDataUpdated | websocketEvent | Videochat 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:participantDisconnectedevent.
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
}