Social API
| Endpoint | Method | Description |
|---|---|---|
| social:sendRequest | websocket | Send friend request |
| social:acceptRequest | websocket | Accept friend request |
| social:declineRequest | websocket | Decline friend request |
| social:deleteRequest | websocket | Delete friend request |
| websocket | Search friends | |
| social:searchUserFriends | websocket | Search user friends |
| social:deleteFriend | websocket | Delete friend |
| social:searchUsers | websocket | Search users |
| social:searchSimpleUsers | websocket | Search simple users |
| social:searchSimpleUsersForGroup | websocket | Search simple users for group |
| social:searchFriendsForGroup | websocket | Search friends for group |
| social:searchSimpleUsersForCommunity | websocket | Search simple users for community |
| social:searchFriendsForCommunity | websocket | Search friends for community |
| social:searchUsersByContacts | websocket | Search users by contacts |
| social:searchUsersByBadgeId | websocket | Search users by badge id |
| social:getUserSimpleInfo | websocket | Get user simple info |
| social:getUserByVerusName | websocket | Get user by verus name |
| social:getUserByVerusIAddress | websocket | Get user by verus i address |
| social:getVerusIdentityOfUser | websocket | Get verus identity of user |
| social:getUserProfileInfo | websocket | Get user profile info |
| social:getUsersSimpleInfo | websocket | Get users simple info |
| social:getSuggestedFriends | websocket | Get suggested friends |
| social:emailFriendRequest | websocket | Friend request by email |
| social:shareContactsWithUser | websocket | Share contacts with user |
| social:shareContactsWithBoothOwners | websocket | Share contacts with booth owners |
| social:followUser | websocket | Follow user |
| social:unfollowUser | websocket | Unfollow user |
| social:searchUserFollowers | websocket | Search user followers |
| social:searchUserFollowings | websocket | Search user followings |
| social:friendAdded | websocketEvent | Friend added event |
| social:friendDeleted | websocketEvent | Friend deleted event |
| social:followingStatusChanged | websocketEvent | Following status changed event |
| social:followerStatusChanged | websocketEvent | Follower 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
}