User API
| Endpoint | Method | Description |
|---|---|---|
| /api/v0/rpc/user.info | jsonRpc | Info |
| /api/v0/rpc/user.pluginPermissions | jsonRpc | Plugin permissions |
| /api/v0/rpc/user.setSocketRoute | jsonRpc | Set socket route |
| user:editProfile | websocket | Edit user profile |
| user:changeEmail | websocket | Change user email |
| user:changePhone | websocket | Change user phone |
| user:changePassword | websocket | Change user password |
| user:changeAvatar | websocket | Change user avatar |
| user:changeAvatar3D | websocket | Change user avatar 3 d |
| user:getRPMAvatarToken | websocket | Get RPM avatar token |
| user:changeCompanyInfo | websocket | Change user company info |
| user:deviceSettings | websocket | Device settings |
| user:setNetworkState | websocket | Set user network state |
| user:setEmailSettings | websocket | Set user email settings |
| user:setNavigationSettings | websocket | Set user navigation settings |
| user:setCollisionSettings | websocket | Set user collision settings |
| user:mergeByEmail | websocket | Merge users by email |
| user:mergeByFacebook | websocket | Merge users by facebook |
| user:setUserIsNotNew | websocket | Set user is not new |
| user:sendUserEmailVerificationToken | websocket | Send user email verification token |
| user:getUserParams | websocket | Get user params |
| user:setUserParams | websocket | Set user params |
| user:listBadgesOfType | websocket | List badges of type |
| user:getLinkedSocialAccounts | websocket | Get social accounts linked to user |
| websocket | Get social accounts linked to user: deprecated | |
| user:unlinkSocialAccount | websocket | Unlink social account from user |
| user:listLinkedPersonaAccounts | websocket | List linked persona accounts |
| user:disable | websocket | Disable user |
| user:getDataForSocketSwitch | websocket | Get data for socket switch |
| user:initPubSubChannel | websocket | Init user pub sub channel |
| user:subscribeToPubSubChannel | websocket | Subscribe to user pub sub channel |
| user:sendToPubSubChannel | websocket | Send to user pub sub channel |
| user:setZAddress | websocket | Set user z address |
| user:listZAddresses | websocket | List user z addresses |
| user:update | websocketEvent | User updated event |
| user:settingsUpdated | websocketEvent | User settings updated event |
| user:avatarUpdated | websocketEvent | User avatar updated event |
| user:linkedToSocialAccount | websocketEvent | On user linked to social account |
| user:unlinkedFromSocialAccount | websocketEvent | On user unlinked from social account |
| user:publicRoomCountUpdated | websocketEvent | User public room count updated event |
| user:contactCountUpdated | websocketEvent | User contact count updated event |
| user:newInvitationsCountUpdated | websocketEvent | User new invitations count updated event |
| user:pendingRequestCountUpdated | websocketEvent | User pending request count updated event |
| user:newNotificationsCountUpdated | websocketEvent | User new notifications count updated event |
| user:idealMatchCountUpdated | websocketEvent | User ideal match count updated event |
| user:avatar3DChanged | websocketEvent | User avatar 3 d changed event |
| user:socketSwitchEvent | websocketEvent | Socket switch event |
| user:onPubSubChannelEvent | websocketEvent | On user pub sub channel event |
| user:setSocketRoute | websocketEvent | Set 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 }
}
Unlink social account from user
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 }
}