Browse SDKs · React Native
SDKsReact Native

Check users in a group

OpenIM React Native SDK guide for check users in a group.

Copy

Call getUsersInGroup() to retrieve the user IDs from a specified set that have joined a group.

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

Parameters

| Parameter | Type | Required | Description | | --- | --- | --- | | groupID | string | Yes | ID of the target group. | | userIDList | string[] | Yes | User IDs to check. |

Return value

When the call completes, it returns string[] containing the user IDs that have joined the target group.