Friends v1
Reference for the Friends v1 endpoints on Roblox.
Base URL: https://friends.roblox.com
Endpoints
Section titled “Endpoints”| Method | Path | Name |
|---|---|---|
POST | /v1/contacts/:targetContactId/request-friendship | postContactsTargetcontactidRequestFriendship |
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 |
DELETE | /v1/my/new-friend-requests | deleteMyNewFriendRequests |
GET | /v1/my/new-friend-requests/count | getMyNewFriendRequestsCount |
POST | /v1/user/:userId/multiget-are-friends | postUserUseridMultigetAreFriends |
POST | /v1/user/following-exists | postUserFollowingExists |
GET | /v1/user/friend-requests/count | getUserFriendRequestsCount |
POST | /v1/user/friend-requests/decline-all | postUserFriendRequestsDeclineAll |
POST | /v1/users/:requesterUserId/accept-friend-request | postUsersRequesteruseridAcceptFriendRequest |
POST | /v1/users/:requesterUserId/decline-friend-request | postUsersRequesteruseridDeclineFriendRequest |
POST | /v1/users/:senderUserId/accept-friend-request-with-token | postUsersSenderuseridAcceptFriendRequestWithToken |
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/request-friendship | postUsersTargetuseridRequestFriendship |
POST | /v1/users/:targetUserId/unfollow | postUsersTargetuseridUnfollow |
POST | /v1/users/:targetUserId/unfriend | postUsersTargetuseridUnfriend |
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 |
postContactsTargetcontactidRequestFriendship
Section titled “postContactsTargetcontactidRequestFriendship”POST /v1/contacts/:targetContactId/request-friendship
Send a contact friend request to target user
Usage
import { fetchApi } from 'rozod';import { postContactsTargetcontactidRequestFriendship } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postContactsTargetcontactidRequestFriendship, { targetContactId: /* string */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetContactId | string | Yes | The target contact Id for friend request |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
success | boolean | |
isCaptchaRequired | boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 5: The target user is already a friend. 6: Invalid parameters. 7: The user cannot be friends with itself. 31: User with max friends sent friend request. |
| 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. |
getMetadata
Section titled “getMetadata”GET /v1/metadata
Usage
import { fetchApi } from 'rozod';import { getMetadata } from 'rozod/lib/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/lib/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/lib/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/lib/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/lib/endpoints/friendsv1';
const data = await fetchApi(getMyFriendsRequests, { limit: /* integer? = 10 */, cursor: /* string? */, sessionId: /* 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. |
sessionId | string? | No | Optional session identifier. |
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 | |
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. |
| 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. |
deleteMyNewFriendRequests
Section titled “deleteMyNewFriendRequests”DELETE /v1/my/new-friend-requests
Usage
import { fetchApi } from 'rozod';import { deleteMyNewFriendRequests } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(deleteMyNewFriendRequests, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
status | boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
getMyNewFriendRequestsCount
Section titled “getMyNewFriendRequestsCount”GET /v1/my/new-friend-requests/count
Usage
import { fetchApi } from 'rozod';import { getMyNewFriendRequestsCount } from 'rozod/lib/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. |
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/lib/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/lib/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/lib/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. |
postUserFriendRequestsDeclineAll
Section titled “postUserFriendRequestsDeclineAll”POST /v1/user/friend-requests/decline-all
Decline all pending friend requests for the authenticated user.
Usage
import { fetchApi } from 'rozod';import { postUserFriendRequestsDeclineAll } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postUserFriendRequestsDeclineAll, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
backgrounded | boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
postUsersRequesteruseridAcceptFriendRequest
Section titled “postUsersRequesteruseridAcceptFriendRequest”POST /v1/users/:requesterUserId/accept-friend-request
Accept a friend request.
Usage
import { fetchApi } from 'rozod';import { postUsersRequesteruseridAcceptFriendRequest } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postUsersRequesteruseridAcceptFriendRequest, { requesterUserId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
requesterUserId | integer | Yes | The user Id of the requester |
Response
Section titled “Response”Type: unknown
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 10: The friend request does not exist. 11: The current users friends limit has been exceeded. 12: The target users friends limit has been exceeded. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed 3: The user is blocked from performing this action. |
postUsersRequesteruseridDeclineFriendRequest
Section titled “postUsersRequesteruseridDeclineFriendRequest”POST /v1/users/:requesterUserId/decline-friend-request
Decline a friend request.
Usage
import { fetchApi } from 'rozod';import { postUsersRequesteruseridDeclineFriendRequest } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postUsersRequesteruseridDeclineFriendRequest, { requesterUserId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
requesterUserId | integer | Yes | The user Id of the requester |
Response
Section titled “Response”Type: unknown
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 10: The friend request does not exist. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
postUsersSenderuseridAcceptFriendRequestWithToken
Section titled “postUsersSenderuseridAcceptFriendRequestWithToken”POST /v1/users/:senderUserId/accept-friend-request-with-token
Accept a friend request with an Off Network Friending token.
Usage
import { fetchApi } from 'rozod';import { postUsersSenderuseridAcceptFriendRequestWithToken } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postUsersSenderuseridAcceptFriendRequestWithToken, { senderUserId: /* integer */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
senderUserId | integer | Yes | The user id of the sender of the off network friend request |
Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
friendingToken | string |
Response
Section titled “Response”Type: unknown
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 3: The user is blocked from performing this action. 5: The target user is already a friend. 6: Invalid parameters. 7: The user cannot be friends with itself. 11: The current users friends limit has been exceeded. 12: The target users friends limit has been exceeded. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
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/lib/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 |
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/lib/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/lib/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/lib/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/lib/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. |
postUsersTargetuseridRequestFriendship
Section titled “postUsersTargetuseridRequestFriendship”POST /v1/users/:targetUserId/request-friendship
Send a friend request to target user
Usage
import { fetchApi } from 'rozod';import { postUsersTargetuseridRequestFriendship } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postUsersTargetuseridRequestFriendship, { targetUserId: /* integer */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId | integer | Yes | The target user Id for friend request |
Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
friendshipOriginSourceType | `“Unknown" | "PlayerSearch" |
senderNickname | string |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
success | boolean | |
isCaptchaRequired | boolean |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. 5: The target user is already a friend. 6: Invalid parameters. 7: The user cannot be friends with itself. 10: The friend request does not exist. 13: The users are not in the same game. 31: User with max friends sent friend request. 35: Invalid nickname. |
| 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. |
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/lib/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. |
postUsersTargetuseridUnfriend
Section titled “postUsersTargetuseridUnfriend”POST /v1/users/:targetUserId/unfriend
Unfriend a user
Usage
import { fetchApi } from 'rozod';import { postUsersTargetuseridUnfriend } from 'rozod/lib/endpoints/friendsv1';
const data = await fetchApi(postUsersTargetuseridUnfriend, { targetUserId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
targetUserId | integer | Yes | The target user id to unfriend |
Response
Section titled “Response”Type: unknown
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The target user is invalid or does not exist. |
| 401 | 0: Authorization has been denied for this request. |
| 403 | 0: Token Validation Failed |
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/lib/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/lib/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/lib/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/lib/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/lib/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/lib/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/lib/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. |