SDKsWASM
Search groups
Search groups joined by the current user and synchronized locally.
searchGroups() searches only groups that the current user has joined and that have synchronized locally. The current API uses only the first item in keywordList.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
keywordList | string[] | Yes | Search keywords. Pass one non-empty, trimmed keyword. |
isSearchGroupID | boolean | Yes | Whether to match groupID. |
isSearchGroupName | boolean | Yes | Whether to match group names. |
const { data: groups } = await openimsdk.searchGroups({
keywordList: [keyword.trim()],
isSearchGroupID: true,
isSearchGroupName: true,
});Return result
After the Promise succeeds, data contains the matched GroupItem[]. See Get joined groups by page for field descriptions. Search results are a snapshot for the current keyword and must not replace the complete joined-group list.
Public group discovery, complex categories, and permission filtering do not belong to this method and should be implemented by the application backend.
Was this page helpful?