Skip to main content
Use the block API when the current user wants to block another user. Use the unblock API to remove that block. The SDK updates relationship data after block and unblock calls. TypeScript returns the updated blocked payload (follows and followCounts). iOS, Android, and Flutter expose these actions as async or completable operations.
Blocking affects relationship state, but downstream visibility and interaction behavior can vary by feature area and backend configuration. Keep feed, comment, search, and profile screens resilient by handling errors from those feature APIs and refreshing relationship status after block or unblock actions.

Parameters

Block User

Block a user when the current user wants to prevent or limit relationship-based interactions with that account.

Handle the blocked-user limit

A network caps how many users one account can block. When the current user is already at that cap, the block call fails with a “maximum blocked users reached” error instead of succeeding. On TypeScript this surfaces as the server error code Amity.ServerError.MAX_BLOCKED_USERS_REACHED (400324). Catch it and prompt the user to unblock someone before blocking another account.

Unblock User

Unblock a user when the current user removes a previously created block.

After Block Or Unblock

After a successful block or unblock action:
  • Refresh follow info if the current screen shows relationship status or counters.
  • Refresh follower/following lists if the current screen displays social graph data.
  • Refresh blocked-user lists if the current screen lets users manage blocked accounts.
  • Handle errors from other feature APIs instead of assuming all product surfaces update in the same way.

Manage Blocked Users

Query the blocked-user list.

Users Who Blocked You

Query the reverse direction.

Follow/Unfollow User

Change follow relationships.