SDKsWASM
Remove group members
Remove one or more members from a specified group.
An authorized group owner or administrator can call kickGroupMember().
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | ID of the group from which to remove members. |
reason | string | Yes | Reason for removal. Pass an empty string if no additional explanation is needed. |
userIDList | string[] | Yes | IDs 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.
Was this page helpful?