Unassigns a role from group members.
You can only unassign ADMIN
roles. Calling this method with group members
with role.value
set to MEMBER
returns an error.
Notes:
function unassignRole(
groupId: string,
memberIds: Array<string>,
role: GroupRole,
): Promise<UnassignRoleResponse>;
Group ID.
Member IDs. Limited to 100 member IDs. See the Members API for details.
Role to unassign.
import { roles } from "@wix/groups";
async function unassignRole(groupId, memberIds, role) {
const response = await roles.unassignRole(groupId, memberIds, role);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.