> For the complete documentation index, see [llms.txt](https://dynamicpixels.gitbook.io/dynamicpixels-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dynamicpixels.gitbook.io/dynamicpixels-docs/unity-sdk/friendship.md).

# Friendship

Explore the list of API functions available in Unity for friendship service, including detailed descriptions and usage examples.

{% hint style="warning" %}
To use service functions, first ensure that the service is activated before. You can see services by opening "Service Hub" From the game's dashboard header.&#x20;
{% endhint %}

### Get Users Friends[​](https://docs.dynamicpixels.dev/friendship/plugin#get-users-friends) <a href="#get-users-friends" id="get-users-friends"></a>

Retrieves a list of friendships for the current user based on the provided parameters.

```csharp
var friends = await ServiceHub.Services.Friendship.GetMyFriends(new GetMyFriendsParams
{
    Skip = 0,
    Limit = 0
});
```

### Get Users Friends Requests[​](https://docs.dynamicpixels.dev/friendship/plugin#get-users-friends-requests) <a href="#get-users-friends-requests" id="get-users-friends-requests"></a>

Retrieves a list of friendship requests received by the current user based on the provided parameters.

```csharp
var requests = await ServiceHub.Services.Friendship.GetMyFriendshipRequests(
new GetMyFriendshipRequestsParams
{
    Skip = 0,
    Limit = 0
});
```

### Get User's Friends Requesting[​](https://docs.dynamicpixels.dev/friendship/plugin#get-users-friends-requesting) <a href="#get-users-friends-requesting" id="get-users-friends-requesting"></a>

Retrieves a list of friendship requesting sent by the current user based on the provided parameters.

```csharp
var requestings = await ServiceHub.Services.Friendship.GetMyFriendshipRequesting(
new GetMyFriendshipRequestingParams
{
    Skip = 0,
    Limit = 0
});
```

### Request Friendship[​](https://docs.dynamicpixels.dev/friendship/plugin#request-friendship) <a href="#request-friendship" id="request-friendship"></a>

Sends a friendship request to another user based on the provided parameters.

```csharp
var requests = await ServiceHub.Services.Friendship.RequestFriendship(new RequestFriendshipParams
{
    UserId = 0
});
```

### Accept a Request[​](https://docs.dynamicpixels.dev/friendship/plugin#accept-a-request) <a href="#accept-a-request" id="accept-a-request"></a>

Accepts a friendship request based on the provided parameters.

```csharp
var requests = await ServiceHub.Services.Friendship.AcceptRequest(new AcceptRequestParams
{
    UserId = 0
});
```

### Reject a Request[​](https://docs.dynamicpixels.dev/friendship/plugin#reject-a-request) <a href="#reject-a-request" id="reject-a-request"></a>

Rejects a friendship request based on the provided parameters.

```csharp
var requests = await ServiceHub.Services.Friendship.RejectRequest(new RejectRequestParams
{
    UserId = 0
});
```

### Reject All Requests[​](https://docs.dynamicpixels.dev/friendship/plugin#reject-all-requests) <a href="#reject-all-requests" id="reject-all-requests"></a>

Rejects all pending friendship requests based on the provided parameters.

```csharp
var requests = await ServiceHub.Services.Friendship.RejectAllRequests(new RejectAllRequestsParams());
```

### Delete a Friend[​](https://docs.dynamicpixels.dev/friendship/plugin#delete-a-friend) <a href="#delete-a-friend" id="delete-a-friend"></a>

Deletes a friendship with a specified user based on the provided parameters.

```csharp
await ServiceHub.Services.Friendship.DeleteFriend(new DeleteParams()
```
