Skip to content
On this page

Social API ​

EndpointMethodDescription
social:sendRequestwebsocketSend friend request
social:acceptRequestwebsocketAccept friend request
social:declineRequestwebsocketDecline friend request
social:deleteRequestwebsocketDelete friend request
social:searchFriendswebsocketSearch friends
social:searchUserFriendswebsocketSearch user friends
social:deleteFriendwebsocketDelete friend
social:searchUserswebsocketSearch users
social:searchSimpleUserswebsocketSearch simple users
social:searchSimpleUsersForGroupwebsocketSearch simple users for group
social:searchFriendsForGroupwebsocketSearch friends for group
social:searchSimpleUsersForCommunitywebsocketSearch simple users for community
social:searchFriendsForCommunitywebsocketSearch friends for community
social:searchUsersByContactswebsocketSearch users by contacts
social:searchUsersByBadgeIdwebsocketSearch users by badge id
social:getUserSimpleInfowebsocketGet user simple info
social:getUserByVerusNamewebsocketGet user by verus name
social:getUserByVerusIAddresswebsocketGet user by verus i address
social:getVerusIdentityOfUserwebsocketGet verus identity of user
social:getUserProfileInfowebsocketGet user profile info
social:getUsersSimpleInfowebsocketGet users simple info
social:getSuggestedFriendswebsocketGet suggested friends
social:emailFriendRequestwebsocketFriend request by email
social:shareContactsWithUserwebsocketShare contacts with user
social:shareContactsWithBoothOwnerswebsocketShare contacts with booth owners
social:followUserwebsocketFollow user
social:unfollowUserwebsocketUnfollow user
social:searchUserFollowerswebsocketSearch user followers
social:searchUserFollowingswebsocketSearch user followings
social:friendAddedwebsocketEventFriend added event
social:friendDeletedwebsocketEventFriend deleted event
social:followingStatusChangedwebsocketEventFollowing status changed event
social:followerStatusChangedwebsocketEventFollower status changed event

Send friend request ​

Method: websocket

Endpoint: social:sendRequest

Description: Api does not create duplicated requests. It ignores request if it was sent before. It accepts request if it was received before. It returns 4003 status code if users are already friends.

Request:

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

Response:

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

Accept friend request ​

Method: websocket

Endpoint: social:acceptRequest

Request:

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

Response:

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

Decline friend request ​

Method: websocket

Endpoint: social:declineRequest

Request:

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

Response:

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

Delete friend request ​

Method: websocket

Endpoint: social:deleteRequest

Request:

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

Response:

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

Search friends ​

Method: websocket

Endpoint: social:searchFriends

DEPRECATED

Description: Deprecated, use social:searchUserFriends instead.

Request:

{
    "data": {
        "forUser": string
        "query": string
        "exclude": [ string ]
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "friends": [{ user simple structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search user friends ​

Method: websocket

Endpoint: social:searchUserFriends

Description: Friend list is ordered by first, last name

Request:

{
    "data": {
        "forUser": string
        "query": string
        "exclude": [ string ]
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "follow": bool
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete friend ​

Method: websocket

Endpoint: social:deleteFriend

Request:

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

Response:

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

Search users ​

Method: websocket

Endpoint: social:searchUsers

Description: API returns list of users found by provided query. API additionally requests publicRoomCount and contactCount for each resulting user. Use social:searchSimpleUsers if counts are not required.

Request:

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

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "publicRoomCount": int
            "contactCount": int
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search simple users ​

Method: websocket

Endpoint: social:searchSimpleUsers

Description: API returns list of users found by provided query.

Request:

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

Response:

{
    "data": {
        "users": [{ user simple structure }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search simple users for group ​

Method: websocket

Endpoint: social:searchSimpleUsersForGroup

Description: API returns list of users found by provided query, with each user's role in the specified group (Admin / Moderator / Participant / empty if not a member).

Request:

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

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "groupRole": string  // Admin / Moderator / Participant / (empty string if not a member)
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search friends for group ​

Method: websocket

Endpoint: social:searchFriendsForGroup

Description: Friend list is ordered by first, last name. Each user includes their role in the specified group (Admin / Moderator / Participant / empty if not a member).

Request:

{
    "data": {
        "groupId": string
        "forUser": string
        "query": string
        "exclude": [ string ]
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "follow": bool
            "groupRole": string  // Admin / Moderator / Participant / (empty string if not a member)
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search simple users for community ​

Method: websocket

Endpoint: social:searchSimpleUsersForCommunity

Description: API returns list of users found by provided query, with each user's role in the specified community (Admin / Moderator / Participant / empty if not a member).

Request:

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

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "communityRole": string  // Admin / Moderator / Participant
            "isOwner": bool  // true if this participant is the current community owner
            "joined": timestamp  // when the user joined the community (zero if not a member)
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search friends for community ​

Method: websocket

Endpoint: social:searchFriendsForCommunity

Description: Friend list is ordered by first, last name. Each user includes their role in the specified community (Admin / Moderator / Participant / empty if not a member).

Request:

{
    "data": {
        "communityId": string
        "forUser": string
        "query": string
        "exclude": [ string ]
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "follow": bool
            "communityRole": string  // Admin / Moderator / Participant / (empty string if not a member)
            "joined": timestamp  // when the user joined the community (zero if not a member)
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search users by contacts ​

Method: websocket

Endpoint: social:searchUsersByContacts

Request:

{
    "data": {
        "email": [ string ]
        "phone": [ string ]
        "facebook": [ string(fbAppId:fbUserId) ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "users": [{ user simple structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search users by badge id ​

Method: websocket

Endpoint: social:searchUsersByBadgeId

Description: API returns list of users holding the given badge, optionally filtered by query.

Request:

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

Response:

{
    "data": {
        "users": [{ user simple structure }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get user simple info ​

Method: websocket

Endpoint: social:getUserSimpleInfo

Description: Returns simple user info.

Request:

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

Response:

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

Get user by verus name ​

Method: websocket

Endpoint: social:getUserByVerusName

Description: Returns simple user info by verus name.

Request:

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

Response:

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

Get user by verus i address ​

Method: websocket

Endpoint: social:getUserByVerusIAddress

Description: Returns simple user info by verus identity IAddress.

Request:

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

Response:

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

Get verus identity of user ​

Method: websocket

Endpoint: social:getVerusIdentityOfUser

Description: Returns Verus identity by user id.

Request:

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

Response:

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

Get user profile info ​

Method: websocket

Endpoint: social:getUserProfileInfo

Description: Returns extended user info for profile page.

Counts user visit, subtracts token from source user and adds token to target user.

Request:

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

Response:

{
    "data": {
        "user": {
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "sharedEmail": string
            "sharedPhone": string
            "follow": bool
            "birthday": string
            "hometown": string
            "education": string
            "description": string
            "linkUrl": string
            "identityType": int  // 0 - Not Assigned, 1 - SSID, 2 - VSSID
            "identityName": string  // Verus identity name
            "contactCount": int  // number of connections (friends) this user has
            "followersCount": int  // number of followers this user has
            "communityCount": int  // number of communities this user participates in, within the current network
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get users simple info ​

Method: websocket

Endpoint: social:getUsersSimpleInfo

Description: Returns list of simple user infos.

Request:

{
    "data": {
        "ids": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "users": [{ user simple structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get suggested friends ​

Method: websocket

Endpoint: social:getSuggestedFriends

Description: Returns users that have most friends in common with current user. If suggested friend list is empty - returns social:searchUsers result.

Request:

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

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "common": int
            "follow": bool
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Friend request by email ​

Method: websocket

Endpoint: social:emailFriendRequest

Description: Function sends friend request email to target address. In addition, if target user exists - creates friend request.

Request:

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

Response:

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

Share contacts with user ​

Method: websocket

Endpoint: social:shareContactsWithUser

Description: UserA can share its contacts (email/phone) with UserB, so UserB could see this data in UserA profile page.

Request:

{
    "data": {
        "targetUser": string
        "shareEmail": bool
        "sharePhone": bool
        "message": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

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

Share contacts with booth owners ​

Method: websocket

Endpoint: social:shareContactsWithBoothOwners

Description: Api sends email to booth owners with current user information (email, first/last name, company name/title)

Request:

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

Response:

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

Follow user ​

Method: websocket

Endpoint: social:followUser

Request:

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

Response:

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

Unfollow user ​

Method: websocket

Endpoint: social:unfollowUser

Request:

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

Response:

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

Search user followers ​

Method: websocket

Endpoint: social:searchUserFollowers

Description: Api returns people who are following current user. Followers are ordered by follow date, most recent followers are first in the list.

Request:

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

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "follow": bool
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search user followings ​

Method: websocket

Endpoint: social:searchUserFollowings

Description: Api returns people who are being followed by current user. Followings are ordered by follow date, most recent followings are first in the list.

Request:

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

Response:

{
    "data": {
        "users": [{
            "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
                "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
                "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
            "isFriend": bool
            "friendRequestSent": bool
            "friendRequestReceived": bool
            "follow": bool
        }]
        "total": int
    }
    "error": { "status": bool, "code": int, "message": string }
}

Friend added event ​

Event: social:friendAdded

Data:

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

Friend deleted event ​

Event: social:friendDeleted

Data:

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

Following status changed event ​

Event: social:followingStatusChanged

Data:

{
    "data": {
        "userId": string
        "targetUserId": string
        "isFollowing": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Follower status changed event ​

Event: social:followerStatusChanged

Data:

{
    "data": {
        "userId": string
        "followerId": string
        "isFollowing": bool
    }
    "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
        "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
        "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
}