removeGroupMembers( )


Removes members from a group.

The removeGroupMembers() function returns a Promise that resolves when the member is removed from the group.

Note: Only site admins and group admins can remove members from their group.

Method Declaration
Copy
function removeGroupMembers(
  groupId: string,
  memberIds: Array<string>,
  options: RemoveGroupMembersOptions,
): Promise<void>;
Method Parameters
groupIdstringRequired

Group ID.


memberIdsArray<string>Required

IDs of the site members to remove from the group.


optionsRemoveGroupMembersOptions
JavaScript
import { members } from "wix-groups.v2"; // Sample groupId: '0261a737-2361-4468-a3b1-5ec2b0667836' // // Sample memberIds: ['937cd3db-e9be-4980-93c1-a6d767a11050', '7fe8e9e1-d050-4c86-9684-e7f231600a34'] async function removeGroupMembers(groupId, memberIds, options) { try { const result = await members.removeGroupMembers(groupId, memberIds); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?