Browse SDKs · WASM
SDKsWASM

Remove a user from the blacklist

Remove a selected user from the current account’s blacklist.

Copy

Pass the ID of the user whose blacklist restriction should be removed. This operation changes only the blacklist relationship maintained by the current account. Do not assume that other application relationships have been restored before the request completes.

await openimsdk.removeBlack(toUserID);

When the Promise resolves, the server has completed the remove request, but the blacklist event may not have arrived yet. When OnBlackDeleted arrives, use the userID in the event data to remove the entry from the blacklist and related caches. For the complete listener, see Get the blacklist. If the application must confirm the state immediately, query the blacklist again and use the latest result.