SDKsWASM
Get the group owner and administrators
Retrieve the owner and administrators of a specified group.
const { data: ownerAndAdmins } =
await openimsdk.getGroupMemberOwnerAndAdmin(groupID);groupID is the ID of the target group.
When the Promise resolves, data is a GroupMemberItem[] containing the group owner and administrators. For field descriptions, see List group members. If you only need members with management roles, this API avoids traversing the complete member list. Use each item's roleLevel to distinguish the owner from administrators.
Subsequent role changes are delivered through OnGroupMemberInfoChanged. Merge them by groupID:userID. For the complete listener implementation, see List group members.
Was this page helpful?