SDKsReact Native
Remove group members
Remove one or more members from a specified group using the OpenIM React Native SDK.
Remove one or more members from a designated group:
await OpenIMSDK.kickGroupMember({
groupID: 'group-001',
reason: 'No longer involved in the project',
userIDList: ['user-002'],
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group ID. |
reason | string | Yes | Reason for removal; pass an empty string "" if no reason is specified. |
userIDList | string[] | Yes | Array of user IDs to remove from the group. |
Return value
A resolved Promise confirms that the specified members have been removed from the group on the server.
Kicking members triggers the OnGroupMemberDeleted event, delivered to both the removed members and remaining group members. Update local state by removing the corresponding member records using the composite identifier groupID:userID, and associate them with the group via groupID. For complete event listeners, see Get group member list by page.
Was this page helpful?