Browse SDKs · React Native
Platform
SDKsReact Native

Check users in a group

Filter a list of user IDs to identify which users belong to a specific group using the OpenIM React Native SDK.

Copy

Filter a list of user IDs to verify which users are currently members of a designated group:

const userIDs = await OpenIMSDK.getUsersInGroup({
  groupID: 'group-001',
  userIDList: ['user-001', 'user-002', 'user-003'],
});

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group ID.
userIDListstring[]YesArray of user IDs to check.

Return value

A resolved Promise returns string[] containing the user IDs that have joined the target group. User IDs omitted from the array are not currently members of the group. To retrieve detailed profile attributes for confirmed members, see Get specified group member profiles.