Skip to content
On this page

User API

EndpointMethodDescription
/api/v0/rpc/user.infojsonRpcInfo
/api/v0/rpc/user.pluginPermissionsjsonRpcPlugin permissions
/api/v0/rpc/user.setSocketRoutejsonRpcSet socket route
user:editProfilewebsocketEdit user profile
user:changeEmailwebsocketChange user email
user:changePhonewebsocketChange user phone
user:changePasswordwebsocketChange user password
user:changeAvatarwebsocketChange user avatar
user:changeAvatar3DwebsocketChange user avatar 3 d
user:getRPMAvatarTokenwebsocketGet RPM avatar token
user:changeCompanyInfowebsocketChange user company info
user:deviceSettingswebsocketDevice settings
user:setNetworkStatewebsocketSet user network state
user:setEmailSettingswebsocketSet user email settings
user:setNavigationSettingswebsocketSet user navigation settings
user:setCollisionSettingswebsocketSet user collision settings
user:mergeByEmailwebsocketMerge users by email
user:mergeByFacebookwebsocketMerge users by facebook
user:setUserIsNotNewwebsocketSet user is not new
user:sendUserEmailVerificationTokenwebsocketSend user email verification token
user:getUserParamswebsocketGet user params
user:setUserParamswebsocketSet user params
user:listBadgesOfTypewebsocketList badges of type
user:getLinkedSocialAccountswebsocketGet social accounts linked to user
user:getSocialAccountswebsocketGet social accounts linked to user: deprecated
user:unlinkSocialAccountwebsocketUnlink social account from user
user:listLinkedPersonaAccountswebsocketList linked persona accounts
user:disablewebsocketDisable user
user:getDataForSocketSwitchwebsocketGet data for socket switch
user:initPubSubChannelwebsocketInit user pub sub channel
user:subscribeToPubSubChannelwebsocketSubscribe to user pub sub channel
user:sendToPubSubChannelwebsocketSend to user pub sub channel
user:setZAddresswebsocketSet user z address
user:listZAddresseswebsocketList user z addresses
user:updatewebsocketEventUser updated event
user:settingsUpdatedwebsocketEventUser settings updated event
user:avatarUpdatedwebsocketEventUser avatar updated event
user:linkedToSocialAccountwebsocketEventOn user linked to social account
user:unlinkedFromSocialAccountwebsocketEventOn user unlinked from social account
user:publicRoomCountUpdatedwebsocketEventUser public room count updated event
user:contactCountUpdatedwebsocketEventUser contact count updated event
user:newInvitationsCountUpdatedwebsocketEventUser new invitations count updated event
user:pendingRequestCountUpdatedwebsocketEventUser pending request count updated event
user:newNotificationsCountUpdatedwebsocketEventUser new notifications count updated event
user:idealMatchCountUpdatedwebsocketEventUser ideal match count updated event
user:avatar3DChangedwebsocketEventUser avatar 3 d changed event
user:socketSwitchEventwebsocketEventSocket switch event
user:onPubSubChannelEventwebsocketEventOn user pub sub channel event
user:setSocketRoutewebsocketEventSet route for user socket

Info

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/rpc/user.info

Headers:

X-Session-Id: sessionToken

Request:

{ empty }

Response:

{
    "data": {
        "user": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "companyName": string  // name of company that user represents
            "companyTitle": string  // user title in the company
            "firstName": string
            "lastName": string
            "birthday": string
            "hometown": string
            "education": string
            "zipCode": string
            "description": string
            "linkUrl": string
            "privacyMode": int  // 0 - Default, 1 - Incognito
            "avatar": string  // url or resource id
            "avatar3D": {  // asset of user 3D avatar
                "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)
            }
            "params": map[string]{ custom structure }  // custom user parameters, for example link to Zoom conference
            "identityType": int  // 0 - Not Assigned, 1 - SSID, 2 - VSSID
            "identityName": string  // Verus identity name
            "zAddress": string  // z-address of user, generated by client application using Verus scoped root key
            "email": string
            "phoneNumber": string
            "permissions": {
                "admin": bool
                "developer": bool
            }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Plugin permissions

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/rpc/user.pluginPermissions

Description: Endpoint returns user permissions that are used by plugin page.

Headers:

X-Session-Id: sessionToken

X-Network-Id: networkId

Request:

{ empty }

Response:

{
    "data": {
        "permissions": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Set socket route

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/rpc/user.setSocketRoute

Headers:

X-Session-Id: sessionToken

X-Network-Id: networkId

Request:

{
    "socketId": string
    "route": string
}

Response:

{ empty }

Edit user profile

Method: websocket

Endpoint: user:editProfile

Request:

{
    "data": {
        "firstName": string
        "lastName": string
        "birthday": string
        "hometown": string
        "education": string
        "description": string
        "linkUrl": string
        "privacyMode": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Change user email

Method: websocket

Endpoint: user:changeEmail

Request:

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

Response:

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

Change user phone

Method: websocket

Endpoint: user:changePhone

Request:

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

Response:

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

Change user password

Method: websocket

Endpoint: user:changePassword

Request:

{
    "data": {
        "password": string
        "newPassword": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Change user avatar

Method: websocket

Endpoint: user:changeAvatar

Request:

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

Response:

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

Change user avatar 3 d

Method: websocket

Endpoint: user:changeAvatar3D

Request:

{
    "data": {
        "avatar3D": {
            "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)
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Get RPM avatar token

Method: websocket

Endpoint: user:getRPMAvatarToken

Request:

{ empty }

Response:

{
    "data": {
        "rpmToken": string  // token to recover avatar session (Ready Player Me)
    }
    "error": { "status": bool, "code": int, "message": string }
}

Change user company info

Method: websocket

Endpoint: user:changeCompanyInfo

Request:

{
    "data": {
        "companyName": string  // name of company that user represents
        "companyTitle": string  // user title in the company
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Device settings

Method: websocket

Endpoint: user:deviceSettings

Request:

{
    "data": {
        "settings": {
            "device_timezone": int
            "device_language": string
            "device_os": int
            "device_push_token": string  // token for push notifications
            "device_application": string  // roomful/texhibition/valuverse/valusocial
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Set user network state

Method: websocket

Endpoint: user:setNetworkState

Request:

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

Response:

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

Set user email settings

Method: websocket

Endpoint: user:setEmailSettings

Description: Api sets user email preferences.

If ignoreNewTextchatMessage set to true, user will not receive emails about new textchat messages.

Request:

{
    "data": {
        "settings": {
            "ignoreNewTextchatMessage": bool
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Set user navigation settings

Method: websocket

Endpoint: user:setNavigationSettings

Description: Api sets user navigation settings.

navigationMode could be one of the following:

  • 0 - classic
  • 1 - advanced
  • 2 - pro

joystickSettings could be one of the following:

  • 0 - left
  • 1 - right
  • 2 - two joysticks

helperButtonAppearance could be one of the following:

  • 0 - default (show buttons by now, may be use network settings in future)
  • 1 - show
  • 2 - hide

Request:

{
    "data": {
        "settings": {
            "navigationMode": int
            "verticalSensitivity": float
            "horizontalSensitivity": float
            "joystickSettings": int
            "helperButtonAppearance": int
        }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Set user collision settings

Method: websocket

Endpoint: user:setCollisionSettings

Request:

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

Response:

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

Merge users by email

Method: websocket

Endpoint: user:mergeByEmail

Request:

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

Response:

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

Merge users by facebook

Method: websocket

Endpoint: user:mergeByFacebook

Request:

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

Response:

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

Set user is not new

Method: websocket

Endpoint: user:setUserIsNotNew

Description: Client should call this endpoint once user entered application for the first time.

Request:

{ empty }

Response:

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

Send user email verification token

Method: websocket

Endpoint: user:sendUserEmailVerificationToken

Request:

{ empty }

Response:

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

Get user params

Method: websocket

Endpoint: user:getUserParams

Request:

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

Response:

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

Set user params

Method: websocket

Endpoint: user:setUserParams

Request:

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

Response:

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

List badges of type

Method: websocket

Endpoint: user:listBadgesOfType

Request:

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

Response:

{
    "data": {
        "badges": [{
            "userId": string
            "id": string
            "created": timestamp
            "updated": timestamp
            "badgeType": string
            "data": map[string]{ custom structure }
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get social accounts linked to user

Method: websocket

Endpoint: user:getLinkedSocialAccounts

Description: Api returns list of social accounts linked to user.

Request:

{ empty }

Response:

{
    "data": {
        "socialAccounts": [{
            "kind": string  // roomful/google/apple/facebook/epam/verus/merkos302
            "socialId": string  // social account unique identifier
            "identityName": string  // Verus identity name
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get social accounts linked to user: deprecated

Method: websocket

Endpoint: user:getSocialAccounts

DEPRECATED

Description: Api returns list of social accounts connected to user.

Request:

{ empty }

Response:

{
    "data": {
        "socialAccounts": [{
            "kind": string  // roomful/google/apple/facebook/epam/verus/merkos302
            "socialId": string  // social account unique identifier
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: user:unlinkSocialAccount

Description: Api unlinks social account.

Request:

{
    "data": {
        "socialKind": string  // google/facebook/apple/verus/merkos302
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

List linked persona accounts

Method: websocket

Endpoint: user:listLinkedPersonaAccounts

Description: Api returns list of social accounts linked to user.

Request:

{ empty }

Response:

{
    "data": {
        "linkedAccounts": [{
            "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
            "identityType": int  // 0 - Not Assigned, 1 - SSID, 2 - VSSID
            "identityName": string  // Verus identity name
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Disable user

Method: websocket

Endpoint: user:disable

Description: Api changes user status to non-active. Disabled users cannot log in to the system, and they are ignored during the search.

Request:

{ empty }

Response:

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

Get data for socket switch

Method: websocket

Endpoint: user:getDataForSocketSwitch

Description: API returns the data that is required for a socket switch. It is recommended to create a new socket connection when switching a network or an account (instead of network:switch).

If user wants to change a network, api checks if user is allowed in the network.

If user wants to switch a persona account, api creates a new sessionId for the account.

If user wants to switch to a network with a new session, the requestNewSessionId parameter should be provided.

Request:

{
    "data": {
        "accountId": string
        "networkId": string
        "requestNewSessionId": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "accountId": string
        "networkId": string
        "newSessionId": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Init user pub sub channel

Method: websocket

Endpoint: user:initPubSubChannel

Description: Api creates channel that could be used by different user sockets to communicate with each other, and subscribes current socket to it.

Request:

{ empty }

Response:

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

Subscribe to user pub sub channel

Method: websocket

Endpoint: user:subscribeToPubSubChannel

Description: Api subscribes socket to channel that could be used by different user sockets to communicate with each other.

Request:

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

Response:

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

Send to user pub sub channel

Method: websocket

Endpoint: user:sendToPubSubChannel

Description: Api sends data to pub-sub channel. Other user sockets, that are subscribed to the channel, will receive this data.

Request:

{
    "data": {
        "channelId": string
        "channelData": { custom structure }
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Set user z address

Method: websocket

Endpoint: user:setZAddress

Request:

{
    "data": {
        "zAddress": string  // zAddress for E2EE messaging
        "title": string  // client title for provided zAddress
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

List user z addresses

Method: websocket

Endpoint: user:listZAddresses

Request:

{ empty }

Response:

{
    "data": {
        "zAddresses": [{
            "userId": string
            "zAddress": string
            "title": string
            "created": timestamp
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

User updated event

Event: user:update

Data:

{
    "data": {
        "user": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "companyName": string  // name of company that user represents
            "companyTitle": string  // user title in the company
            "firstName": string
            "lastName": string
            "birthday": string
            "hometown": string
            "education": string
            "zipCode": string
            "description": string
            "linkUrl": string
            "privacyMode": int  // 0 - Default, 1 - Incognito
            "avatar": string  // url or resource id
            "avatar3D": {  // asset of user 3D avatar
                "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)
            }
            "params": map[string]{ custom structure }  // custom user parameters, for example link to Zoom conference
            "identityType": int  // 0 - Not Assigned, 1 - SSID, 2 - VSSID
            "identityName": string  // Verus identity name
            "zAddress": string  // z-address of user, generated by client application using Verus scoped root key
            "publicRoomCount": int
            "contactCount": int
            "pendingContactCount": int
            "newInvitationsCount": int
            "pendingRequestCount": int
            "newNotificationsCount": int
            "idealMatchCount": int
            "isDisabled": bool
            "isNew": bool
            "email": string
            "emailVerified": bool
            "phoneNumber": string
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

User settings updated event

Event: user:settingsUpdated

Data:

{
    "data": {
        "email": {
            "ignoreNewTextchatMessage": bool
        }
        "navigation": {
            "navigationMode": int
            "verticalSensitivity": float
            "horizontalSensitivity": float
            "joystickSettings": int
            "helperButtonAppearance": int
        }
        "objectCollision": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

User avatar updated event

Event: user:avatarUpdated

Data:

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

On user linked to social account

Event: user:linkedToSocialAccount

Data:

{
    "data": {
        "kind": string  // roomful/google/apple/facebook/epam/verus/merkos302
        "socialId": string  // social account unique identifier
        "identityName": string  // Verus identity name
    }
    "error": { "status": bool, "code": int, "message": string }
}

On user unlinked from social account

Event: user:unlinkedFromSocialAccount

Data:

{
    "data": {
        "kind": string  // roomful/google/apple/facebook/epam/verus/merkos302
        "socialId": string  // social account unique identifier
        "identityName": string  // Verus identity name
    }
    "error": { "status": bool, "code": int, "message": string }
}

User public room count updated event

Event: user:publicRoomCountUpdated

Data:

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

User contact count updated event

Event: user:contactCountUpdated

Data:

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

User new invitations count updated event

Event: user:newInvitationsCountUpdated

Data:

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

User pending request count updated event

Event: user:pendingRequestCountUpdated

Data:

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

User new notifications count updated event

Event: user:newNotificationsCountUpdated

Data:

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

User ideal match count updated event

Event: user:idealMatchCountUpdated

Data:

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

User avatar 3 d changed event

Event: user:avatar3DChanged

Data:

{
    "data": {
        "userId": string
        "avatar3D": {
            "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)
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Socket switch event

Event: user:socketSwitchEvent

Description: Api sends event to user sockets with the same sessionId as current socket. Event is being sent when one of users' session sockets decides switch socket in order to change account or network (and receive new sessionId).

Data:

{
    "data": {
        "accountId": string
        "networkId": string
        "newSessionId": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

On user pub sub channel event

Event: user:onPubSubChannelEvent

Description: Api sends event to user sockets subscribed to channel (except initiator socket).

Data:

{
    "data": {
        "channelId": string
        "channelData": { custom structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Set route for user socket

Event: user:setSocketRoute

Description: Event contains route, that should be used by client to switch context.

Data:

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