ModerationBlock UserList Blocked Users

List Blocked Users

Overview

Retrieve the current user’s complete block list, displaying detailed information for all blocked users. This API provides users with the ability to manage their personal block list, including viewing blocked users’ basic information, block times, and related chatroom information. It is suitable for users to review and manage their privacy settings.


API Endpoint

Get Block List

Retrieve detailed information about all block relationships created by the current user.

GET /blockStatus/my

Headers

ParameterTypeRequiredDescription
IM-CLIENT-KEYstringClient Key
IM-AuthorizationstringClient Token

Example Request

Get the complete block list

GET /blockStatus/my HTTP/1.1
IM-CLIENT-KEY: {IM-CLIENT-KEY}
IM-Authorization: {IM-Authorization}
Host: your-app.imkit.io
Connection: close

JavaScript Example:

const response = await axios.get(
  `https://your-app.imkit.io/blockStatus/my`,
  {
    headers: {
      "IM-CLIENT-KEY": IM_CLIENT_KEY,
      "IM-Authorization": TOKEN,
    },
  }
);

cURL Example:

curl -X "GET" "https://your-app.imkit.io/blockStatus/my" \
     -H 'IM-CLIENT-KEY: {IM-CLIENT-KEY}' \
     -H 'IM-Authorization: {IM-Authorization}'

Response

Success Response (200 OK)

ParameterTypeDescription
RCnumberResponse code (0 indicates success)
RMstringResponse message
resultobjectBlock list data

Result Object Structure

ParameterTypeDescription
dataarrayBlock relationship array

Block Relationship Object Structure

ParameterTypeDescription
blockeeobjectDetailed information of blocked user
blockerstringID of the user who performed the block
roomobjectDetailed information of associated chatroom
createdAtstringBlock creation time
updatedAtstringBlock update time

Blocked User Object Structure

ParameterTypeDescription
_idstringUser unique ID
nicknamestringUser nickname
avatarUrlstringUser avatar URL
idstringUser ID
lastLoginTimeMSnumberLast login time (millisecond timestamp)

Chatroom Object Structure

ParameterTypeDescription
_idstringChatroom unique ID
roomTypestringChatroom type (direct/group)
idstringChatroom ID
createdTimeMSnumberChatroom creation time (millisecond timestamp)

Example Response

{
  "RC": 0,
  "RM": "OK",
  "result": {
    "data": [
      {
        "blockee": {
          "_id": "ccc",
          "avatarUrl": "http://loremflickr.com/240/240/style?1628093667",
          "nickname": "Cathy",
          "id": "ccc",
          "lastLoginTimeMS": 1600006869368
        },
        "blocker": "aaa",
        "room": {
          "_id": "2bec603e94a210092439e83ff2d79ac1",
          "roomType": "direct",
          "id": "2bec603e94a210092439e83ff2d79ac1",
          "createdTimeMS": 1628089206798
        },
        "createdAt": "2021-08-04T15:18:10.735Z",
        "updatedAt": "2021-08-04T15:18:10.735Z"
      },
      {
        "blockee": {
          "_id": "ddd",
          "nickname": "Dina",
          "avatarUrl": "http://loremflickr.com/240/240/style?1628088855",
          "id": "ddd",
          "lastLoginTimeMS": 1628094314986
        },
        "blocker": "aaa",
        "room": {
          "_id": "8ab6c2ec1f2ee3f7d46cea03bdca4c9b",
          "roomType": "direct",
          "id": "8ab6c2ec1f2ee3f7d46cea03bdca4c9b",
          "createdTimeMS": 1628089213796
        },
        "createdAt": "2021-08-04T15:18:07.649Z",
        "updatedAt": "2021-08-04T15:18:07.649Z"
      }
    ]
  }
}

Error Response

401 Unauthorized - Authentication failed

{
  "RC": 401,
  "RM": "Unauthorized",
  "error": {
    "code": "INVALID_TOKEN",
    "message": "Invalid or expired token"
  }
}

403 Forbidden - Insufficient permissions

{
  "RC": 403,
  "RM": "Access denied",
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You don't have permission to access this resource"
  }
}

Use Cases

Personal Privacy Management

  • Block List Review: View all currently blocked users
  • Privacy Settings Management: Review and manage personal privacy status in one place
  • Relationship Status Confirmation: Confirm the block status of a specific user

User Experience Optimization

  • List Management Interface: Provide a complete blocked user management feature
  • Quick Unblock: Quickly select users to unblock from the list
  • Status Synchronization: Ensure block list consistency across all platforms

System Management

  • Behavior Tracking: Understand user blocking behavior patterns
  • Relationship Analysis: Analyze interaction relationships between users
  • Data Statistics: Track usage statistics of the block feature

Notes

  • Own List Only: Users can only view block relationships they have created
  • Complete Information: Includes detailed information about blocked users and associated chatrooms
  • Time Sorting: Typically sorted by block time
  • Chatroom Types: Supports block relationships for both direct chats and group chats
  • Real-Time: Returns the current latest block list status
  • Empty List Handling: Returns an empty array if no users have been blocked
© 2026 FUNTEK Software Inc. All rights reserved.