Friends v1
Reference for the Friends v1 endpoints on Roblox.
Base URL: https://friends.roblox.com
Endpoints
Section titled “Endpoints”| Method | Path | Name |
|---|---|---|
GET |
/v1/metadata |
getMetadata |
GET |
/v1/my/friends/:userId/check-qr-session |
getMyFriendsUseridCheckQrSession |
GET |
/v1/my/friends/count |
getMyFriendsCount |
POST |
/v1/my/friends/refresh-qr-session |
postMyFriendsRefreshQrSession |
GET |
/v1/my/friends/requests |
getMyFriendsRequests |
GET |
/v1/my/new-friend-requests/count |
getMyNewFriendRequestsCount |
GET |
/v1/my/trusted-friends/count |
getMyTrustedFriendsCount |
GET |
/v1/my/trusted-friends/requests |
getMyTrustedFriendsRequests |
POST |
/v1/user/:userId/multiget-are-friends |
postUserUseridMultigetAreFriends |
POST |
/v1/user/following-exists |
postUserFollowingExists |
GET |
/v1/user/friend-requests/count |
getUserFriendRequestsCount |
GET |
/v1/user/trusted-friend-requests/count |
getUserTrustedFriendRequestsCount |
POST |
/v1/users/:targetUserId/follow |
postUsersTargetuseridFollow |
GET |
/v1/users/:targetUserId/followers |
getUsersTargetuseridFollowers |
GET |
/v1/users/:targetUserId/followers/count |
getUsersTargetuseridFollowersCount |
GET |
/v1/users/:targetUserId/followings |
getUsersTargetuseridFollowings |
GET |
/v1/users/:targetUserId/followings/count |
getUsersTargetuseridFollowingsCount |
POST |
/v1/users/:targetUserId/unfollow |
postUsersTargetuseridUnfollow |
GET |
/v1/users/:userId/friends |
getUsersUseridFriends |
GET |
/v1/users/:userId/friends/count |
getUsersUseridFriendsCount |
GET |
/v1/users/:userId/friends/find |
getUsersUseridFriendsFind |
GET |
/v1/users/:userId/friends/inactive |
getUsersUseridFriendsInactive |
GET |
/v1/users/:userId/friends/online |
getUsersUseridFriendsOnline |
GET |
/v1/users/:userId/friends/search |
getUsersUseridFriendsSearch |
GET |
/v1/users/:userId/friends/statuses |
getUsersUseridFriendsStatuses |
GET |
/v1/users/:userId/trusted-friends/count |
getUsersUseridTrustedFriendsCount |
getMetadata
Section titled “getMetadata”GET /v1/metadata
Usage
import { fetchApi } from 'rozod';import { getMetadata } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMetadata, { targetUserId: /* integer? */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer? |
No |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
isFriendsFilterBarEnabled |
boolean |
|
isFriendsPageSortExperimentEnabled |
boolean |
|
isFriendsUserDataStoreCacheEnabled |
boolean |
|
frequentFriendSortRollout |
number |
|
userName |
string |
|
displayName |
string |
getMyFriendsUseridCheckQrSession
Section titled “getMyFriendsUseridCheckQrSession”GET /v1/my/friends/:userId/check-qr-session
Usage
import { fetchApi } from 'rozod';import { getMyFriendsUseridCheckQrSession } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMyFriendsUseridCheckQrSession, { userId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | user Id that shows the qr code |
Response
Section titled “Response”Type: boolean
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
getMyFriendsCount
Section titled “getMyFriendsCount”GET /v1/my/friends/count
Get the number of friends a user has
Usage
import { fetchApi } from 'rozod';import { getMyFriendsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMyFriendsCount, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
postMyFriendsRefreshQrSession
Section titled “postMyFriendsRefreshQrSession”POST /v1/my/friends/refresh-qr-session
Usage
import { fetchApi } from 'rozod';import { postMyFriendsRefreshQrSession } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(postMyFriendsRefreshQrSession, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
Success |
boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
getMyFriendsRequests
Section titled “getMyFriendsRequests”GET /v1/my/friends/requests
Get all users that friend requests with targetUserId using exclusive start paging
Usage
import { fetchApi } from 'rozod';import { getMyFriendsRequests } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMyFriendsRequests, { limit: /* integer? = 10 */, cursor: /* string? */, sessionId: /* string? */, uprankUnseen: /* boolean? */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit |
integer? = 10 |
No | The number of results per request. |
cursor |
string? |
No | The paging cursor for the previous or next page. |
sessionId |
string? |
No | Optional session identifier. |
uprankUnseen |
boolean? |
No | Whether to uprank unseen friend requests and return isUnseen per friend request. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor |
string |
|
nextPageCursor |
string |
|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
friendRequest |
object |
See below |
mutualFriendsList |
string[] |
|
hasVerifiedBadge |
boolean |
|
isUnseen |
boolean |
|
description |
string |
|
created |
string |
|
isBanned |
boolean |
|
externalAppDisplayName |
string |
|
id |
number |
|
name |
string |
|
displayName |
string |
friendRequest fields:
| Field | Type | Description |
|---|---|---|
sentAt |
string |
|
senderId |
number |
|
sourceUniverseId |
number |
|
originSourceType |
`“Unknown” | “PlayerSearch” |
contactName |
string |
|
senderNickname |
string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. 34: Invalid pagination cursor. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 2: The user is banned from performing operation. 3: The user is blocked from performing this action. |
| 429 | 9: The flood limit has been exceeded. |
getMyNewFriendRequestsCount
Section titled “getMyNewFriendRequestsCount”GET /v1/my/new-friend-requests/count
Usage
import { fetchApi } from 'rozod';import { getMyNewFriendRequestsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMyNewFriendRequestsCount, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
getMyTrustedFriendsCount
Section titled “getMyTrustedFriendsCount”GET /v1/my/trusted-friends/count
Get the number of trusted friends a user has
Usage
import { fetchApi } from 'rozod';import { getMyTrustedFriendsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMyTrustedFriendsCount, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
getMyTrustedFriendsRequests
Section titled “getMyTrustedFriendsRequests”GET /v1/my/trusted-friends/requests
Get all incoming trusted friend requests using exclusive start paging.
Usage
import { fetchApi } from 'rozod';import { getMyTrustedFriendsRequests } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getMyTrustedFriendsRequests, { limit: /* integer? = 10 */, cursor: /* string? */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit |
integer? = 10 |
No | The number of results per request. |
cursor |
string? |
No | The paging cursor for the previous or next page. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor |
string |
|
nextPageCursor |
string |
|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
sentAt |
string |
|
senderId |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 2: The user is banned from performing operation. 3: The user is blocked from performing this action. |
| 429 | 9: The flood limit has been exceeded. |
postUserUseridMultigetAreFriends
Section titled “postUserUseridMultigetAreFriends”POST /v1/user/:userId/multiget-are-friends
Check if the requesting user is friends with the specified users.
Usage
import { fetchApi } from 'rozod';import { postUserUseridMultigetAreFriends } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(postUserUseridMultigetAreFriends, { userId: /* integer */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The requesting userId. |
Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
targetUserIds |
number[] |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
friendsId |
number[] |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. |
| 403 | 0: Token Validation Failed |
postUserFollowingExists
Section titled “postUserFollowingExists”POST /v1/user/following-exists
Returns whether or not the current user is following each userId in a list of userIds
Usage
import { fetchApi } from 'rozod';import { postUserFollowingExists } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(postUserFollowingExists, { body: { /* ... */ }});Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
targetUserIds |
number[] |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
followings |
object[] |
See below |
followings[] item fields:
| Field | Type | Description |
|---|---|---|
isFollowing |
boolean |
|
isFollowed |
boolean |
|
userId |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 0: An invalid userId was passed in. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
| 503 | 1: Followers are disabled at this time. |
getUserFriendRequestsCount
Section titled “getUserFriendRequestsCount”GET /v1/user/friend-requests/count
Return the number of pending friend requests.
Usage
import { fetchApi } from 'rozod';import { getUserFriendRequestsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUserFriendRequestsCount, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
getUserTrustedFriendRequestsCount
Section titled “getUserTrustedFriendRequestsCount”GET /v1/user/trusted-friend-requests/count
Return the number of pending trusted friend requests.
Usage
import { fetchApi } from 'rozod';import { getUserTrustedFriendRequestsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUserTrustedFriendRequestsCount, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
postUsersTargetuseridFollow
Section titled “postUsersTargetuseridFollow”POST /v1/users/:targetUserId/follow
Creates the following between a user and user with targetUserId
Usage
import { fetchApi } from 'rozod';import { postUsersTargetuseridFollow } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(postUsersTargetuseridFollow, { targetUserId: /* integer */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer |
Yes |
Request Body
Section titled “Request Body”Type: RobloxWebCaptchaModelsRequestCaptchaTokenRequest.optional()
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
success |
boolean |
|
isCaptchaRequired |
boolean |
|
notificationMuted |
boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. 8: The user cannot follow itself. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed 2: The user is banned from performing operation. 3: The user is blocked from performing this action. 14: The user has not passed the captcha. |
| 429 | 9: The flood limit has been exceeded. |
getUsersTargetuseridFollowers
Section titled “getUsersTargetuseridFollowers”GET /v1/users/:targetUserId/followers
Get all users that follow user with targetUserId in page response format
Usage
import { fetchApi } from 'rozod';import { getUsersTargetuseridFollowers } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersTargetuseridFollowers, { targetUserId: /* integer */, cursor: /* string? */, sortOrder: /* enum */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer |
Yes | |
cursor |
string? |
No | The paging cursor for the previous or next page. |
sortOrder |
enum |
Yes | The order the results are sorted in. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor |
string |
|
nextPageCursor |
string |
|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
isOnline |
boolean |
|
presenceType |
`0 | 1 |
isDeleted |
boolean |
|
friendFrequentScore |
number |
|
friendFrequentRank |
number |
|
hasVerifiedBadge |
boolean |
|
description |
string |
|
created |
string |
|
isBanned |
boolean |
|
externalAppDisplayName |
string |
|
id |
number |
|
name |
string |
|
displayName |
string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
| 403 | 2: The user is banned from performing operation. 3: The user is blocked from performing this action. |
| 429 | 9: The flood limit has been exceeded. |
getUsersTargetuseridFollowersCount
Section titled “getUsersTargetuseridFollowersCount”GET /v1/users/:targetUserId/followers/count
Get the number of following a user has
Usage
import { fetchApi } from 'rozod';import { getUsersTargetuseridFollowersCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersTargetuseridFollowersCount, { targetUserId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer |
Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. |
getUsersTargetuseridFollowings
Section titled “getUsersTargetuseridFollowings”GET /v1/users/:targetUserId/followings
Get all users that user with targetUserId is following in page response format
Usage
import { fetchApi } from 'rozod';import { getUsersTargetuseridFollowings } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersTargetuseridFollowings, { targetUserId: /* integer */, cursor: /* string? */, sortOrder: /* enum */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer |
Yes | |
cursor |
string? |
No | The paging cursor for the previous or next page. |
sortOrder |
enum |
Yes | The order the results are sorted in. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor |
string |
|
nextPageCursor |
string |
|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
isOnline |
boolean |
|
presenceType |
`0 | 1 |
isDeleted |
boolean |
|
friendFrequentScore |
number |
|
friendFrequentRank |
number |
|
hasVerifiedBadge |
boolean |
|
description |
string |
|
created |
string |
|
isBanned |
boolean |
|
externalAppDisplayName |
string |
|
id |
number |
|
name |
string |
|
displayName |
string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
| 403 | 2: The user is banned from performing operation. 3: The user is blocked from performing this action. |
| 429 | 9: The flood limit has been exceeded. |
getUsersTargetuseridFollowingsCount
Section titled “getUsersTargetuseridFollowingsCount”GET /v1/users/:targetUserId/followings/count
Get the number of following a user has
Usage
import { fetchApi } from 'rozod';import { getUsersTargetuseridFollowingsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersTargetuseridFollowingsCount, { targetUserId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer |
Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. |
postUsersTargetuseridUnfollow
Section titled “postUsersTargetuseridUnfollow”POST /v1/users/:targetUserId/unfollow
Deletes the following between a user and user with targetUserId
Usage
import { fetchApi } from 'rozod';import { postUsersTargetuseridUnfollow } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(postUsersTargetuseridUnfollow, { targetUserId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId |
integer |
Yes |
Response
Section titled “Response”Type: unknown
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. 8: The user cannot follow itself. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed 2: The user is banned from performing operation. 3: The user is blocked from performing this action. 14: The user has not passed the captcha. |
| 429 | 9: The flood limit has been exceeded. |
getUsersUseridFriends
Section titled “getUsersUseridFriends”GET /v1/users/:userId/friends
Get list of all friends for the specified user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriends } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriends, { userId: /* integer */, userSort: /* unknown */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The user Id to get the friends for. |
userSort |
unknown |
Yes | Specifies how to sort the returned friends. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
isOnline |
boolean |
|
presenceType |
`0 | 1 |
isDeleted |
boolean |
|
friendFrequentScore |
number |
|
friendFrequentRank |
number |
|
hasVerifiedBadge |
boolean |
|
description |
string |
|
created |
string |
|
isBanned |
boolean |
|
externalAppDisplayName |
string |
|
id |
number |
|
name |
string |
|
displayName |
string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. |
getUsersUseridFriendsCount
Section titled “getUsersUseridFriendsCount”GET /v1/users/:userId/friends/count
Get the number of friends a user has
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriendsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriendsCount, { userId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. |
getUsersUseridFriendsFind
Section titled “getUsersUseridFriendsFind”GET /v1/users/:userId/friends/find
Get a paginated list of all friends for the specified user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriendsFind } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriendsFind, { userId: /* integer */, cursor: /* string? */, limit: /* integer? = 50 */, findFriendsType: /* unknown */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The user Id to get the friends for. |
cursor |
string? |
No | The paging cursor for the previous or next page. |
limit |
integer? = 50 |
No | The number of results per request. |
findFriendsType |
unknown |
Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
PreviousCursor |
string |
|
PageItems |
object[] |
See below |
NextCursor |
string |
|
HasMore |
boolean |
PageItems[] item fields:
| Field | Type | Description |
|---|---|---|
id |
number |
|
hasVerifiedBadge |
boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
getUsersUseridFriendsInactive
Section titled “getUsersUseridFriendsInactive”GET /v1/users/:userId/friends/inactive
Get list of inactive friends for the specified user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriendsInactive } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriendsInactive, { userId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The user Id to get the friends for. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
isOnline |
boolean |
|
presenceType |
`0 | 1 |
isDeleted |
boolean |
|
friendFrequentScore |
number |
|
friendFrequentRank |
number |
|
hasVerifiedBadge |
boolean |
|
description |
string |
|
created |
string |
|
isBanned |
boolean |
|
externalAppDisplayName |
string |
|
id |
number |
|
name |
string |
|
displayName |
string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
| 401 | 0: Authorization has been denied for this request. |
getUsersUseridFriendsOnline
Section titled “getUsersUseridFriendsOnline”GET /v1/users/:userId/friends/online
Get list of all online friends for the specified user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriendsOnline } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriendsOnline, { userId: /* integer */, userSort: /* unknown */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The user Id to get the friends for. |
userSort |
unknown |
Yes | The sort order to return the friends. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
userPresence |
object |
See below |
sortScore |
number |
|
id |
number |
|
name |
string |
|
displayName |
string |
userPresence fields:
| Field | Type | Description |
|---|---|---|
UserPresenceType |
string |
|
UserLocationType |
string |
|
lastLocation |
string |
|
placeId |
number |
|
rootPlaceId |
number |
|
gameInstanceId |
string |
|
universeId |
number |
|
lastOnline |
string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
| 401 | 0: Authorization has been denied for this request. |
getUsersUseridFriendsSearch
Section titled “getUsersUseridFriendsSearch”GET /v1/users/:userId/friends/search
Search for friends by name using a text query.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriendsSearch } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriendsSearch, { userId: /* integer */, query: /* string? */, cursor: /* string? */, limit: /* integer? = 20 */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The user Id to get the friends for. |
query |
string? |
No | The string to search names of friends for. |
cursor |
string? |
No | The paging cursor for the previous or next page. |
limit |
integer? = 20 |
No | The number of results per request. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
PreviousCursor |
string |
|
PageItems |
object[] |
See below |
NextCursor |
string |
|
HasMore |
boolean |
PageItems[] item fields:
| Field | Type | Description |
|---|---|---|
id |
number |
|
hasVerifiedBadge |
boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 6: Invalid parameters. |
| 401 | 0: Authorization has been denied for this request. |
getUsersUseridFriendsStatuses
Section titled “getUsersUseridFriendsStatuses”GET /v1/users/:userId/friends/statuses
Gets a list of friend statuses of specified users against the specified user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridFriendsStatuses } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridFriendsStatuses, { userId: /* integer */, userIds: /* number */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes | The user to check the friend statuses against. |
userIds |
number |
Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
data |
object[] |
See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
id |
number |
|
status |
`“NotFriends” | “Friends” |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 15: Too many ids. 16: Invalid ids. |
getUsersUseridTrustedFriendsCount
Section titled “getUsersUseridTrustedFriendsCount”GET /v1/users/:userId/trusted-friends/count
Get the number of trusted friends a user has
Usage
import { fetchApi } from 'rozod';import { getUsersUseridTrustedFriendsCount } from 'rozod/endpoints/friendsv1';
const data = await fetchApi(getUsersUseridTrustedFriendsCount, { userId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId |
integer |
Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
count |
number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |