SDKsWASM
Search group members
Search for members in a specified group.
Use searchGroupMembers() to find members or populate a list of @ mention candidates. The current API only uses the first entry in keywordList.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | ID of the target group. |
keywordList | string[] | Yes | Search keywords. |
isSearchUserID | boolean | Yes | Whether to match user IDs. |
isSearchMemberNickname | boolean | Yes | Whether to match nicknames within the group. |
offset | number | Yes | Pagination offset. Pass 0 for the first page. |
count | number | Yes | Maximum number of members to retrieve. |
const { data: members } = await openimsdk.searchGroupMembers({
groupID,
keywordList: [keyword.trim()],
isSearchUserID: true,
isSearchMemberNickname: true,
offset: 0,
count: 50,
});When the Promise resolves, data is the current page of matching GroupMemberItem[]. For field descriptions, see List group members. Search results are a member snapshot for the current keyword and must not replace the complete member list.
Reset pagination whenever the keyword or filter criteria change.
Was this page helpful?