> ## Documentation Index
> Fetch the complete documentation index at: https://social-b97141fb-feat-user-history-moderation-detail.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Blocked Users

> Query the current user's blocked-user list with the social.plus SDKs.

Use blocked-user list APIs to build a settings screen where users can review accounts they have blocked and unblock them when needed.

There are two read patterns:

| API | Best for | Platforms |
| - | - | - |
| `getBlockedUsers()` | A paginated management screen | TypeScript, iOS, Android, Flutter |
| `getAllBlockedUsers()` | A one-shot list for local decisions | TypeScript, iOS, Android |

> [!NOTE]
>
> These APIs return users the current user has **blocked**. To read the reverse direction — users who have **blocked the current user** — see [Users Who Blocked You](./manage-blocking-users).

## Parameters

| Operation | Parameter | Required | Description |
| - | - | - | - |
| Get blocked users | `limit` / page size | No | Page size for the paginated blocked-user list where the platform exposes it. |
| Get blocked users | Pagination handle | No | Use each platform's live collection, paging, or callback pagination to load more blocked users. |
| Get all blocked users | None | No | Returns a one-shot list on TypeScript, iOS, and Android. Not exposed in the current public Flutter repository. |

## Get Blocked Users

Query blocked users for a paginated account-management screen.

```swift iOS theme={null}
let repository = AmityUserRepository()
let blockedUsers = repository.getBlockedUsers()

_ = blockedUsers.observe { collection, error in
    if let error {
        handleError(error)
        return
    }

    let users = collection.snapshots
    _ = users.first?.userId
}

blockedUsers.nextPage()
```

```kotlin Android theme={null}
val disposable = AmityCoreClient.newUserRepository()
    .getBlockedUsers()
    .subscribe(
        { pagingData: PagingData<AmityUser> ->
            showSuccessMessage(pagingData)
        },
        { error ->
            handleGeneralError(error)
        },
    )
```

```typescript TypeScript theme={null}
import { UserRepository } from '@amityco/ts-sdk';

let loadMoreBlockedUsers: (() => void) | undefined;

const unsubscribe = UserRepository.getBlockedUsers(
  { limit: 25 },
  ({ data: users, onNextPage, hasNextPage, loading, error }) => {
    if (error) {
      handleError(error);
      return;
    }

    if (!loading && users) {
      renderResults(users);
    }

    loadMoreBlockedUsers = hasNextPage ? onNextPage : undefined;
  },
);
```

```dart Flutter theme={null}
final page = await AmityCoreClient.newUserRepository()
    .getBlockedUsers()
    .getPagingData(limit: 20);

final blockedUsers = page.data;
```

## Get All Blocked Users

Use `getAllBlockedUsers()` when your app needs a one-shot list instead of a paginated collection. TypeScript, iOS, and Android return up to 100 blocked users and use a short SDK-side cache. Call the method again when you need a fresh snapshot.

```swift iOS theme={null}
let repository = AmityUserRepository()
let blockedUsers = try await repository.getAllBlockedUsers()

let blockedUserIds = Set(blockedUsers.map { $0.userId })
```

```kotlin Android theme={null}
val disposable = AmityCoreClient.newUserRepository()
    .getAllBlockedUsers()
    .subscribe(
        { users: List<AmityUser> ->
            val blockedUserIds = users.map { it.getUserId() }.toSet()
            showSuccessMessage(blockedUserIds)
        },
        { error ->
            handleGeneralError(error)
        },
    )
```

```typescript TypeScript theme={null}
import { UserRepository } from '@amityco/ts-sdk';

const blockedUsers = await UserRepository.getAllBlockedUsers();
const blockedUserIds = new Set(blockedUsers.map((user) => user.userId));
```

> [!WARNING]
>
> The one-shot API is not available in the Flutter public repository. For Flutter, use `getBlockedUsers().getPagingData(...)` and page through the result.

## Related Topics

> **[Users Who Blocked You](./manage-blocking-users)**
>
> Query the reverse direction.

> **[Block & Unblock User](./block-unblock-user)**
>
> Change blocked status.

> **[Follower Lists](../following/get-follower-following-list)**
>
> Query social graph lists.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.