Browse SDKs · WASM
SDKsWASM

Get joined groups by page

Page through groups joined by the current user.

Copy

Use getJoinedGroupListPage() when the user belongs to many groups.

Parameters

ParameterTypeRequiredDescription
offsetnumberYesStarting offset. Pass 0 for the first page.
countnumberYesNumber of groups to read.
const { data: firstPage } = await openimsdk.getJoinedGroupListPage({
  offset: 0,
  count: 50,
});

Return result

After the Promise succeeds, data contains the current page of GroupItem[]. Increase offset by the number of items requested, not by the length of an array that has already incorporated event updates.

Group profile fields

FieldTypeDescription
groupIDstringStable group ID and merge key for group lists and events.
groupNamestringGroup name.
faceURLstringGroup avatar URL.
introductionstringGroup introduction.
notificationstringCurrent group announcement.
notificationUserIDstringUser ID that most recently updated the announcement.
notificationUpdateTimenumberTime when the announcement was last updated.
ownerUserIDstringCurrent group owner's user ID.
creatorUserIDstringUser ID that created the group.
createTimenumberTime when the group was created.
memberCountnumberSnapshot of the current member count.
groupTypeGroupTypeGroup type.
statusGroupStatusCurrent group state, such as normal, blocked, dismissed, or group-wide muted.
needVerificationGroupVerificationTypePolicy determining whether joining requires approval.
applyMemberFriendAllowTypeWhether members may send friend applications to one another.
lookMemberInfoAllowTypeWhether ordinary members may view other member profiles.
displayIsReadbooleanWhether the group displays group-message read state. Browser clients cannot change this field through the group profile API.
exstringApplication-defined group extension string.

The group name, avatar, and member count are snapshots at call time. While the list is open, merge group events by groupID. Do not rely only on stale cached data for permission decisions.

If a group-add or group-delete event arrives during pagination, reset pagination and reload from the first page. See Group overview for complete event handling.