Blocked UsersUSER-ONLY

User clients can block users and manage the account’s block list.

Blocking a User

Use blockUser with the user’s identifier.

await client.blockUser(userId);

Listing Blocked Users

Use getBlockedUsers to get a BlockedUserList.

const { blockedUsers } = await client.getBlockedUsers();

for (const { user, blockedAt } of blockedUsers) {
  console.log(user.id, user.firstName, blockedAt);
}

Unblocking a User

Use unblockUser with the user’s identifier.

await client.unblockUser(userId);