Browse SDKs · React Native
SDKsReact Native

Search groups

OpenIM React Native SDK guide for search groups.

Copy

Call searchGroups() to search groups by group ID or group name.

const groups = await OpenIMSDK.searchGroups({
  keywordList: ['project'],
  isSearchGroupID: false,
  isSearchGroupName: true,
});

Parameters

| Parameter | Type | Required | Description | | --- | --- | --- | | keywordList | string[] | Yes | Search keywords. | | isSearchGroupID | boolean | Yes | Whether to match group IDs. | | isSearchGroupName | boolean | Yes | Whether to match group names. |

Return value

When the call completes, it returns matching GroupItem[] entries. See Group overview for field descriptions.