---
name: "Connections"
last_updated: 2026-06-10T02:18:03Z
type: feature
api_base_url: "https://apis.roblox.com"
endpoints: 25
auth: [api-key, oauth2, cookie]
description: "Manage user connections, such as [declining all connection requests](#friends_post_v1_users__requesterUserId__decline_friend_request) or [retrieving a connection list](#friends_get_v1_users__userId__friends)"
---

# Connections

Manage user connections, such as [declining all connection requests](#friends_post_v1_users__requesterUserId__decline_friend_request) or [retrieving a connection list](#friends_get_v1_users__userId__friends).

**Base URL:** `https://apis.roblox.com`

    ## Authentication

    Each endpoint requires one of the following authentication methods:

    - **API Key**: Pass your key in the `x-api-key` HTTP header. Create keys at [Creator Dashboard](https://create.roblox.com/dashboard/credentials).
- **OAuth 2.0**: Use Bearer token in the `Authorization` header. Authorization URL: `https://apis.roblox.com/oauth/v1/authorize`, Token URL: `https://apis.roblox.com/oauth/v1/token`
- **Cookie** *(not recommended)*: `.ROBLOSECURITY` cookie. Do not use in production.

    ```
    # API Key example
    curl -H "x-api-key: YOUR_API_KEY" https://apis.roblox.com/...

    # OAuth 2.0 example
    curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" https://apis.roblox.com/...
    ```

## Endpoints

### POST `/v1/contacts/{targetContactId}/request-friendship`

Send a contact friend request to target user

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `targetContactId` | path | `string` | Yes | The target contact Id for friend request |

**Responses:**

- `200`: OK → `Roblox.Friends.Api.CaptchaStatusResponseModel`
- `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.

**Response fields** (`Roblox.Friends.Api.CaptchaStatusResponseModel`)

See [Roblox.Friends.Api.CaptchaStatusResponseModel](#roblox-friends-api-captchastatusresponsemodel) in Models.

**Response example:**
```json
{
  "success": false,
  "isCaptchaRequired": false
}
```

**Error handling:** `429`: Retry with exponential backoff (start at 1s). `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/contacts/{TARGETCONTACTID}/request-friendship"
```

### GET `/v1/metadata#FriendsApi`

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `targetUserId` | query | `integer` | No |  |

**Responses:**

- `200`: OK → `Roblox.Friends.Api.Models.Response.FriendsPageMetadataResponse`

**Response fields** (`Roblox.Friends.Api.Models.Response.FriendsPageMetadataResponse`)

See [Roblox.Friends.Api.Models.Response.FriendsPageMetadataResponse](#roblox-friends-api-models-response-friendspagemetadataresponse) in Models.

**Response example:**
```json
{
  "isFriendsFilterBarEnabled": false,
  "isFriendsPageSortExperimentEnabled": false,
  "isFriendsUserDataStoreCacheEnabled": false,
  "frequentFriendSortRollout": 0,
  "userName": "string",
  "displayName": "string"
}
```

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/metadata#FriendsApi"
```

### GET `/v1/my/friends/count`

Get the number of friends a user has

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Responses:**

- `200`: OK → `Roblox.Friends.Api.FriendsCountResponse`
- `401`: 0: Authorization has been denied for this request.

**Response fields** (`Roblox.Friends.Api.FriendsCountResponse`)

See [Roblox.Friends.Api.FriendsCountResponse](#roblox-friends-api-friendscountresponse) in Models.

**Response example:**
```json
{
  "count": 0
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/my/friends/count"
```

### POST `/v1/my/friends/refresh-qr-session`

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Responses:**

- `200`: OK → `Roblox.Friends.Api.Models.Response.RefreshQrSessionResponse`
- `401`: 0: Authorization has been denied for this request.
- `403`: 0: Token Validation Failed

**Response fields** (`Roblox.Friends.Api.Models.Response.RefreshQrSessionResponse`)

See [Roblox.Friends.Api.Models.Response.RefreshQrSessionResponse](#roblox-friends-api-models-response-refreshqrsessionresponse) in Models.

**Response example:**
```json
{
  "Success": false
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/my/friends/refresh-qr-session"
```

### GET `/v1/my/friends/requests`

Get all users that friend requests with targetUserId using exclusive start paging

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `limit` | query | `integer` | No | The number of results per request. |
| `cursor` | query | `string` | No | The paging cursor for the previous or next page. |
| `sessionId` | query | `string` | No | Optional session identifier. |
| `friendRequestSort` | query | `0 \| 1 \| 2` | No | Valid values: `0`, `1`, `2` |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.Models.ApiPageResponse_Roblox.Friends.Api.FriendRequestResponse_`
- `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.

**Response fields** (`Roblox.Web.WebAPI.Models.ApiPageResponse_Roblox.Friends.Api.FriendRequestResponse_`)

See [Roblox.Web.WebAPI.Models.ApiPageResponse_Roblox.Friends.Api.FriendRequestResponse_](#roblox-web-webapi-models-apipageresponse-roblox-friends-api-friendrequestresponse-) in Models.

**Response example:**
```json
{
  "previousPageCursor": "string",
  "nextPageCursor": "string",
  "data": [
    {
      "friendRequest": "...",
      "mutualFriendsList": "...",
      "hasVerifiedBadge": "...",
      "description": "...",
      "created": "...",
      "isBanned": "..."
    }
  ]
}
```

**Error handling:** `429`: Retry with exponential backoff (start at 1s). `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/my/friends/requests"
```

### GET `/v1/my/friends/{userId}/check-qr-session`

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | user Id that shows the qr code |

**Responses:**

- `200`: OK → `boolean`
- `401`: 0: Authorization has been denied for this request.

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/my/friends/{USERID}/check-qr-session"
```

### DELETE `/v1/my/new-friend-requests`

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Responses:**

- `200`: OK → `Roblox.Friends.Api.Models.Response.ClearNewFriendRequestResponse`
- `401`: 0: Authorization has been denied for this request.
- `403`: 0: Token Validation Failed

**Response fields** (`Roblox.Friends.Api.Models.Response.ClearNewFriendRequestResponse`)

See [Roblox.Friends.Api.Models.Response.ClearNewFriendRequestResponse](#roblox-friends-api-models-response-clearnewfriendrequestresponse) in Models.

**Response example:**
```json
{
  "status": false
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X DELETE -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/my/new-friend-requests"
```

### GET `/v1/my/new-friend-requests/count`

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Responses:**

- `200`: OK → `Roblox.Friends.Api.Models.Response.NewFriendRequestsCountResponse`
- `401`: 0: Authorization has been denied for this request.

**Response fields** (`Roblox.Friends.Api.Models.Response.NewFriendRequestsCountResponse`)

See [Roblox.Friends.Api.Models.Response.NewFriendRequestsCountResponse](#roblox-friends-api-models-response-newfriendrequestscountresponse) in Models.

**Response example:**
```json
{
  "count": 0
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/my/new-friend-requests/count"
```

### POST `/v1/presence/users`

**Server:** `https://presence.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Request Body:** `application/json` — Type: `any`

**Responses:**

- `200`: Success → `UserPresencesResponse`
- `400`: Bad Request → `PresenceApi.ErrorResponse`
- `403`: Forbidden → `PresenceApi.ErrorResponse`
- `429`: Too Many Requests → `PresenceApi.ErrorResponse`

**Response fields** (`UserPresencesResponse`)

See [UserPresencesResponse](#userpresencesresponse) in Models.

**Response example:**
```json
{
  "userPresences": [
    {
      "userPresenceType": "...",
      "lastLocation": "...",
      "placeId": "...",
      "rootPlaceId": "...",
      "gameId": "...",
      "universeId": "..."
    }
  ]
}
```

**Error handling:** `429`: Retry with exponential backoff (start at 1s). `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://presence.roblox.com/v1/presence/users" \
  -H "Content-Type: application/json" \
  -d '"..."'
```

### GET `/v1/user/friend-requests/count`

Return the number of pending friend requests.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Responses:**

- `200`: OK → `Roblox.Friends.Api.PendingFriendRequestCountModel`
- `401`: 0: Authorization has been denied for this request.

**Response fields** (`Roblox.Friends.Api.PendingFriendRequestCountModel`)

See [Roblox.Friends.Api.PendingFriendRequestCountModel](#roblox-friends-api-pendingfriendrequestcountmodel) in Models.

**Response example:**
```json
{
  "count": 0
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/user/friend-requests/count"
```

### POST `/v1/user/friend-requests/decline-all`

Decline all pending friend requests for the authenticated user.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Responses:**

- `200`: OK → `Roblox.Friends.Api.Models.Response.DeclineAllFriendRequestsResponse`
- `401`: 0: Authorization has been denied for this request.
- `403`: 0: Token Validation Failed

**Response fields** (`Roblox.Friends.Api.Models.Response.DeclineAllFriendRequestsResponse`)

See [Roblox.Friends.Api.Models.Response.DeclineAllFriendRequestsResponse](#roblox-friends-api-models-response-declineallfriendrequestsresponse) in Models.

**Response example:**
```json
{
  "backgrounded": false
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/user/friend-requests/decline-all"
```

### POST `/v1/user/{userId}/multiget-are-friends`

Check if the requesting user is friends with the specified users.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The requesting userId. |

**Request Body:** `application/json` — Type: `Roblox.Friends.Api.MultigetAreFriendsRequestModel`

See [Roblox.Friends.Api.MultigetAreFriendsRequestModel](#roblox-friends-api-multigetarefriendsrequestmodel) in Models.

**Request example:**
```json
{
  "targetUserIds": [
    0
  ]
}
```

**Responses:**

- `200`: OK → `Roblox.Friends.Api.MultigetAreFriendsResponse`
- `400`: 1: The target user is invalid or does not exist.
- `403`: 0: Token Validation Failed

**Response fields** (`Roblox.Friends.Api.MultigetAreFriendsResponse`)

See [Roblox.Friends.Api.MultigetAreFriendsResponse](#roblox-friends-api-multigetarefriendsresponse) in Models.

**Response example:**
```json
{
  "friendsId": [
    0
  ]
}
```

**Error handling:** `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/user/{USERID}/multiget-are-friends" \
  -H "Content-Type: application/json" \
  -d '{
  "targetUserIds": [
    0
  ]
}'
```

### POST `/v1/users/{requesterUserId}/accept-friend-request`

Accept a friend request.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `requesterUserId` | path | `integer` | Yes | The user Id of the requester |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.ApiEmptyResponseModel`
- `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.

**Response fields** (`Roblox.Web.WebAPI.ApiEmptyResponseModel`)

See [Roblox.Web.WebAPI.ApiEmptyResponseModel](#roblox-web-webapi-apiemptyresponsemodel) in Models.

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{REQUESTERUSERID}/accept-friend-request"
```

### POST `/v1/users/{requesterUserId}/decline-friend-request`

Decline a friend request.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `requesterUserId` | path | `integer` | Yes | The user Id of the requester |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.ApiEmptyResponseModel`
- `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

**Response fields** (`Roblox.Web.WebAPI.ApiEmptyResponseModel`)

See [Roblox.Web.WebAPI.ApiEmptyResponseModel](#roblox-web-webapi-apiemptyresponsemodel) in Models.

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{REQUESTERUSERID}/decline-friend-request"
```

### POST `/v1/users/{senderUserId}/accept-friend-request-with-token`

Accept a friend request with an Off Network Friending token.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `senderUserId` | path | `integer` | Yes | The user id of the sender of the off network friend request |

**Request Body:** `application/json` — Type: `Roblox.Friends.Api.Models.Request.FriendingTokenRequestModel`

See [Roblox.Friends.Api.Models.Request.FriendingTokenRequestModel](#roblox-friends-api-models-request-friendingtokenrequestmodel) in Models.

**Request example:**
```json
{
  "friendingToken": "string"
}
```

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.ApiEmptyResponseModel`
- `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

**Response fields** (`Roblox.Web.WebAPI.ApiEmptyResponseModel`)

See [Roblox.Web.WebAPI.ApiEmptyResponseModel](#roblox-web-webapi-apiemptyresponsemodel) in Models.

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{SENDERUSERID}/accept-friend-request-with-token" \
  -H "Content-Type: application/json" \
  -d '{
  "friendingToken": "string"
}'
```

### POST `/v1/users/{targetUserId}/request-friendship`

Send a friend request to target user

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `targetUserId` | path | `integer` | Yes | The target user Id for friend request |

**Request Body:** `application/json` — Type: `Roblox.Friends.Api.FriendshipRequestModel`

See [Roblox.Friends.Api.FriendshipRequestModel](#roblox-friends-api-friendshiprequestmodel) in Models.

**Request example:**
```json
{
  "friendshipOriginSourceType": 0,
  "senderNickname": "string"
}
```

**Responses:**

- `200`: OK → `Roblox.Friends.Api.CaptchaStatusResponseModel`
- `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.

**Response fields** (`Roblox.Friends.Api.CaptchaStatusResponseModel`)

See [Roblox.Friends.Api.CaptchaStatusResponseModel](#roblox-friends-api-captchastatusresponsemodel) in Models.

**Response example:**
```json
{
  "success": false,
  "isCaptchaRequired": false
}
```

**Error handling:** `429`: Retry with exponential backoff (start at 1s). `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{TARGETUSERID}/request-friendship" \
  -H "Content-Type: application/json" \
  -d '{
  "friendshipOriginSourceType": 0,
  "senderNickname": "string"
}'
```

### POST `/v1/users/{targetUserId}/unfriend`

Unfriend a user

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `targetUserId` | path | `integer` | Yes | The target user id to unfriend |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.ApiEmptyResponseModel`
- `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

**Response fields** (`Roblox.Web.WebAPI.ApiEmptyResponseModel`)

See [Roblox.Web.WebAPI.ApiEmptyResponseModel](#roblox-web-webapi-apiemptyresponsemodel) in Models.

**Error handling:** `401`: Check that your API key/token is valid and not expired. `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -X POST -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{TARGETUSERID}/unfriend"
```

### GET `/v1/users/{userId}/friends`

Get list of all friends for the specified user.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user Id to get the friends for. |
| `userSort` | query | `0 \| 1 \| 2` | No | Specifies how to sort the returned friends. Valid values: `0`, `1`, `2` |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_`
- `400`: 1: The target user is invalid or does not exist.

**Response fields** (`Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_`)

See [Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_](#roblox-web-webapi-models-apiarrayresponse-roblox-friends-api-models-response-userresponse-) in Models.

**Response example:**
```json
{
  "data": [
    {
      "isOnline": "...",
      "presenceType": "...",
      "isDeleted": "...",
      "friendFrequentScore": "...",
      "friendFrequentRank": "...",
      "hasVerifiedBadge": "..."
    }
  ]
}
```

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends"
```

### GET `/v1/users/{userId}/friends/count`

Get the number of friends a user has

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes |  |

**Responses:**

- `200`: OK → `Roblox.Friends.Api.FriendsCountResponse`
- `400`: 1: The target user is invalid or does not exist.

**Response fields** (`Roblox.Friends.Api.FriendsCountResponse`)

See [Roblox.Friends.Api.FriendsCountResponse](#roblox-friends-api-friendscountresponse) in Models.

**Response example:**
```json
{
  "count": 0
}
```

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends/count"
```

### GET `/v1/users/{userId}/friends/find`

Get a paginated list of all friends for the specified user.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user Id to get the friends for. |
| `userSort` | query | `0 \| 1 \| 2` | No | Specifies how to sort the returned friends. Valid values: `0`, `1`, `2` |
| `cursor` | query | `string` | No | The paging cursor for the previous or next page. |
| `limit` | query | `integer` | No | The number of results per request. |
| `findFriendsType` | query | `0 \| 1` | No | Valid values: `0`, `1` |

**Responses:**

- `200`: OK → `Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_`
- `400`: 1: The target user is invalid or does not exist. 6: Invalid parameters.

**Response fields** (`Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_`)

See [Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_](#roblox-paging-cursoredpagedresult-roblox-friends-api-models-response-friendresponse-) in Models.

**Response example:**
```json
{
  "PreviousCursor": "string",
  "PageItems": [
    {
      "id": "...",
      "hasVerifiedBadge": "..."
    }
  ],
  "NextCursor": "string",
  "HasMore": false
}
```

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends/find"
```

### GET `/v1/users/{userId}/friends/groups/roles`

Gets a list of all groups the specified users' friends are in.

**Server:** `https://groups.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user id. |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Groups.Api.UserGroupMembershipResponse_`
- `400`: 3: The user is invalid or does not exist.
- `403`: 3: The user is invalid or does not exist.

**Response fields** (`Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Groups.Api.UserGroupMembershipResponse_`)

See [Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Groups.Api.UserGroupMembershipResponse_](#roblox-web-webapi-models-apiarrayresponse-roblox-groups-api-usergroupmembershipresponse-) in Models.

**Response example:**
```json
{
  "data": [
    {
      "user": "...",
      "groups": "..."
    }
  ]
}
```

**Error handling:** `403`: Verify your API key has the required scopes listed above. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://groups.roblox.com/v1/users/{USERID}/friends/groups/roles"
```

### GET `/v1/users/{userId}/friends/inactive`

Get list of inactive friends for the specified user.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user Id to get the friends for. |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_`
- `400`: 1: The target user is invalid or does not exist. 6: Invalid parameters.
- `401`: 0: Authorization has been denied for this request.

**Response fields** (`Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_`)

See [Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_](#roblox-web-webapi-models-apiarrayresponse-roblox-friends-api-models-response-userresponse-) in Models.

**Response example:**
```json
{
  "data": [
    {
      "isOnline": "...",
      "presenceType": "...",
      "isDeleted": "...",
      "friendFrequentScore": "...",
      "friendFrequentRank": "...",
      "hasVerifiedBadge": "..."
    }
  ]
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends/inactive"
```

### GET `/v1/users/{userId}/friends/online`

Get list of all online friends for the specified user.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user Id to get the friends for. |
| `userSort` | query | `0 \| 1 \| 2` | No | The sort order to return the friends. Valid values: `0`, `1`, `2` |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserPresenceResponse_`
- `400`: 1: The target user is invalid or does not exist. 6: Invalid parameters.
- `401`: 0: Authorization has been denied for this request.

**Response fields** (`Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserPresenceResponse_`)

See [Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserPresenceResponse_](#roblox-web-webapi-models-apiarrayresponse-roblox-friends-api-models-response-userpresenceresponse-) in Models.

**Response example:**
```json
{
  "data": [
    {
      "userPresence": "...",
      "sortScore": "...",
      "id": "...",
      "name": "...",
      "displayName": "..."
    }
  ]
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends/online"
```

### GET `/v1/users/{userId}/friends/search`

Search for friends by name using a text query.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user Id to get the friends for. |
| `query` | query | `string` | No | The string to search names of friends for. |
| `cursor` | query | `string` | No | The paging cursor for the previous or next page. |
| `limit` | query | `integer` | No | The number of results per request. |

**Responses:**

- `200`: OK → `Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_`
- `400`: 1: The target user is invalid or does not exist. 6: Invalid parameters.
- `401`: 0: Authorization has been denied for this request.

**Response fields** (`Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_`)

See [Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_](#roblox-paging-cursoredpagedresult-roblox-friends-api-models-response-friendresponse-) in Models.

**Response example:**
```json
{
  "PreviousCursor": "string",
  "PageItems": [
    {
      "id": "...",
      "hasVerifiedBadge": "..."
    }
  ],
  "NextCursor": "string",
  "HasMore": false
}
```

**Error handling:** `401`: Check that your API key/token is valid and not expired. 

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends/search"
```

### GET `/v1/users/{userId}/friends/statuses`

Gets a list of friend statuses of specified users against the specified user.

**Server:** `https://friends.roblox.com`

**Auth:** Cookie (`.ROBLOSECURITY`)

**Parameters:**

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `userId` | path | `integer` | Yes | The user to check the friend statuses against. |
| `userIds` | query | `integer[]` | Yes |  |

**Responses:**

- `200`: OK → `Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.FriendStatusResponse_`
- `400`: 1: The target user is invalid or does not exist. 15: Too many ids. 16: Invalid ids.

**Response fields** (`Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.FriendStatusResponse_`)

See [Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.FriendStatusResponse_](#roblox-web-webapi-models-apiarrayresponse-roblox-friends-api-friendstatusresponse-) in Models.

**Response example:**
```json
{
  "data": [
    {
      "id": "...",
      "status": "..."
    }
  ]
}
```

**Example:**
```bash
curl -b ".ROBLOSECURITY=$ROBLOSECURITY" \
  "https://friends.roblox.com/v1/users/{USERID}/friends/statuses?userIds={VALUE}"
```

## Models

### Roblox.Friends.Api.CaptchaStatusResponseModel

This is response model to notify when action succeeded, failed, or captcha is required

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `success` | `boolean` | No |  |
| `isCaptchaRequired` | `boolean` | No | Captcha is set to true if captcha is required from user to perform action |

### Roblox.Friends.Api.Models.Response.FriendsPageMetadataResponse

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `isFriendsFilterBarEnabled` | `boolean` | No |  |
| `isFriendsPageSortExperimentEnabled` | `boolean` | No |  |
| `isFriendsUserDataStoreCacheEnabled` | `boolean` | No |  |
| `frequentFriendSortRollout` | `integer` | No |  |
| `userName` | `string` | No |  |
| `displayName` | `string` | No |  |

### Roblox.Friends.Api.FriendsCountResponse

Response model for Friends Count

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | No | Count of friends |

### Roblox.Friends.Api.Models.Response.RefreshQrSessionResponse

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `Success` | `boolean` | No |  |

### Roblox.Web.WebAPI.Models.ApiPageResponse_Roblox.Friends.Api.FriendRequestResponse_

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `previousPageCursor` | `string` | No |  |
| `nextPageCursor` | `string` | No |  |
| `data` | `Roblox.Friends.Api.FriendRequestResponse[]` | No |  |

### Roblox.Friends.Api.Models.Response.ClearNewFriendRequestResponse

The friendship status response model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `status` | `boolean` | No | Returns if the cache was successfully cleared. |

### Roblox.Friends.Api.Models.Response.NewFriendRequestsCountResponse

The friendship status response model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | No | Count of new friend requests. |

### UserPresencesResponse

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `userPresences` | `UserPresence[]` | No |  |

### PresenceApi.ErrorResponse

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `errors` | `Error[]` | No |  |

### Roblox.Friends.Api.PendingFriendRequestCountModel

Response model for Pending Friend Request Count

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `count` | `integer` | No | Count of pending friend requests |

### Roblox.Friends.Api.Models.Response.DeclineAllFriendRequestsResponse

response for DeclineAllFriendRequests

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `backgrounded` | `boolean` | No | Whether or not the decline all job has been backgrounded |

### Roblox.Friends.Api.MultigetAreFriendsRequestModel

Request model for MultigetAreFriends endpoint

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `targetUserIds` | `integer[]` | No | The target userIds to check against with the requesting user regarding friendship. |

### Roblox.Friends.Api.MultigetAreFriendsResponse

Response model for MultigetAreFriendsResponse

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `friendsId` | `integer[]` | No | friends id list |

### Roblox.Friends.Api.Models.Request.FriendingTokenRequestModel

Request model for AcceptFriendRequestWithToken endpoint

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `friendingToken` | `string` | No | FriendingToken to authorize the creation of an Off Network Friend request |

### Roblox.Friends.Api.FriendshipRequestModel

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `friendshipOriginSourceType` | `integer enum (11 values)` | No | Which source the friend request originated from ['Unknown' = 0, 'PlayerSearch' = 1, 'QrCode' = 2, 'InGame' = 3, 'UserProfile' = 4, 'QqContactImporter' = 5, 'WeChatContactImporter' = 6, 'ProfileShare' = 7, 'PhoneContactImporter' = 8, 'FriendRecommendations' = 9, 'UserCommunities' = 10] Values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 |
| `senderNickname` | `string` | No | Optional nickname attached to friend request |

### Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserResponse_

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `Roblox.Friends.Api.Models.Response.UserResponse[]` | No |  |

### Roblox.Paging.CursoredPagedResult_Roblox.Friends.Api.Models.Response.FriendResponse_

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `PreviousCursor` | `string` | No |  |
| `PageItems` | `Roblox.Friends.Api.Models.Response.FriendResponse[]` | No |  |
| `NextCursor` | `string` | No |  |
| `HasMore` | `boolean` | No |  |

### Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Groups.Api.UserGroupMembershipResponse_

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `Roblox.Groups.Api.UserGroupMembershipResponse[]` | No |  |

### Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.Models.Response.UserPresenceResponse_

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `Roblox.Friends.Api.Models.Response.UserPresenceResponse[]` | No |  |

### Roblox.Web.WebAPI.Models.ApiArrayResponse_Roblox.Friends.Api.FriendStatusResponse_

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `Roblox.Friends.Api.FriendStatusResponse[]` | No |  |