Browse SDKs · WASM
SDKsWASM

Remove group members

Remove one or more members from a specified group.

Copy

An authorized group owner or administrator can call kickGroupMember().

Parameters

ParameterTypeRequiredDescription
groupIDstringYesID of the group from which to remove members.
reasonstringYesReason for removal. Pass an empty string if no additional explanation is needed.
userIDListstring[]YesIDs of the members to remove.
await openimsdk.kickGroupMember({
  groupID,
  reason: 'No longer participating in the project',
  userIDList: [targetUserID],
});

You cannot use this method to remove the group owner. Transfer group ownership first.

When the Promise resolves, the removal request has completed. OnGroupMemberDeleted may arrive afterward; remove each member by groupID:userID when it does. For the complete listener implementation, see List group members.