Blocked UsersUSER-ONLY
User Walkthrough 18 of 50
Users can block users and manage the account’s block list.
Blocking a User
blockUser accepts the user’s identifier.
await client.blockUser(userId);
Listing Blocked Users
getBlockedUsers lets you get a BlockedUserList.
const { blockedUsers } = await client.getBlockedUsers();
for (const { user, blockedAt } of blockedUsers) {
console.log(user.id, user.firstName, blockedAt);
}
Unblocking a User
unblockUser accepts the user’s identifier.
await client.unblockUser(userId);