Browse SDKs · WASM
SDKsWASM

Check group membership

Check which users in a given set still belong to a specified group.

Copy

Use getUsersInGroup() when you only need to check group membership and do not need complete member profiles:

const { data: presentUserIDs } = await openimsdk.getUsersInGroup({
  groupID,
  userIDList,
});

When the Promise resolves, data is an array containing the IDs from userIDList that still belong to the target group at the time of the call. The query itself does not trigger member events.