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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group ID. |
userIDList | string[] | Yes | Array 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.
Was this page helpful?