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 belong to the target group. The result is a snapshot taken at call time, and the query itself does not trigger member events.