GroupGetMemberInfoList
(Details) to get the list of members in a specified group. This list contains the profile information of each member, such as user ID (group_member_info_identifier
), group name card (group_member_info_name_card
), profile photo (group_member_info_face_url
), nickname (group_member_info_nick_name
), and time for joining the group (group_member_info_join_time
).group_get_members_info_list_param_option
) and paged pull (group_get_members_info_list_param_next_seq
) advanced features of the API for pulling the group member list.filter
)GroupGetMemberInfoList
API (Details), you can specify to pull the list of the information of specified roles.Filter | Type |
TIMGroupMemberRoleFlag.kTIMGroupMemberRoleFlag_All | Pull the list of the information of all the group members |
TIMGroupMemberRoleFlag.kTIMGroupMemberRoleFlag_Owner | Pull the list of the information of the group owner |
TIMGroupMemberRoleFlag.kTIMGroupMemberRoleFlag_Admin | Pull the list of the information of the group admin |
TIMGroupMemberRoleFlag.kTIMGroupMemberRoleFlag_Member | Pull the list of the information of ordinary group members |
// Specify to pull the profile of the group owner through the `filter` parameterGroupGetMemberInfoListParam param = new GroupGetMemberInfoListParam{group_get_members_info_list_param_group_id = "group_id",group_get_members_info_list_param_option = new GroupMemberGetInfoOption{group_member_get_info_option_role_flag = TIMGroupMemberRoleFlag.kTIMGroupMemberRoleFlag_Owner}};TIMResult res = TencentIMSDK.GroupGetMemberInfoList(param, (int code, string desc, GroupGetMemberInfoListResult result, string user_data)=>{// Process the async logic});
nextSeq
)GroupGetMemberInfoList
for the first time, set nextSeq
to 0
(indicating to pull the group member list from the beginning). Up to 50 group member objects can be pulled at a time.GroupGetMemberInfoListResult
callback of GroupGetMemberInfoList
will contain group_get_memeber_info_list_result_next_seq
(which is the field for the next pull):group_get_memeber_info_list_result_next_seq
is 0
, all the group members have been pulled.group_get_memeber_info_list_result_next_seq
is greater than 0
, there are more group members that can be pulled. This doesn't mean that the next page of the member list will be pulled immediately. In common communications software, a paged pull is often triggered by a swipe operation.GroupGetMemberInfoList
API and pass in the nextSeq
parameter (the value is from the GroupGetMemberInfoListResult
object returned by the last pull) for the next pull.nextSeq
is 0
.// Specify to pull the profile of the group owner through the `filter` parameterGroupGetMemberInfoListParam param = new GroupGetMemberInfoListParam{group_get_members_info_list_param_group_id = "group_id",group_get_members_info_list_param_option = new GroupMemberGetInfoOption{group_member_get_info_option_role_flag = TIMGroupMemberRoleFlag.kTIMGroupMemberRoleFlag_Owner},group_get_members_info_list_param_next_seq = 0};TIMResult res = TencentIMSDK.GroupGetMemberInfoList(param, (int code, string desc, GroupGetMemberInfoListResult result, string user_data)=>{// Process the async logic});
GroupModifyMemberInfo
(Details) to mute a specified group member and set the muting period in seconds. The muting information is stored in the group_member_info_shutup_time
attribute of the group member.GroupTipsEventCallback
callback (Details).GroupModifyGroupInfo
API (Details) to mute the entire group by setting the group_modify_info_param_is_shutup_all
attribute to true
. The entire group can be muted for an unlimited period of time and needs to be unmuted by changing group_modify_info_param_is_shutup_all
to false
.// Mute the group member `userB` for ten minutesGroupModifyMemberInfoParam param = new GroupModifyMemberInfoParam{group_modify_member_info_group_id = "group_id",group_modify_member_info_identifier = "userB",group_modify_member_info_modify_flag = TIMGroupMemberModifyInfoFlag.kTIMGroupMemberModifyFlag_ShutupTime,group_modify_member_info_shutup_time = 600};TIMResult res = TencentIMSDK.GroupModifyMemberInfo(param, (int code, string desc, string user_data)=>{// Process the async logic});// Mute allGroupModifyInfoParam param = new GroupModifyInfoParam{group_modify_info_param_group_id = "group_id",group_modify_info_param_modify_flag = TIMGroupModifyInfoFlag.kTIMGroupModifyInfoFlag_ShutupAll,group_modify_info_param_is_shutup_all = true};TIMResult res = TencentIMSDK.GroupModifyGroupInfo(param, (int code, string desc, string user_data)=>{// Process the async logic});
GroupDeleteMember
API (Details) to remove a specified ordinary group member from the group.GroupTipsEventCallback
callback (Details).GroupModifyMemberInfo
(Details) to mute a specified member to implement similar controls.GroupDeleteMemberParam param = new GroupDeleteMemberParam{group_delete_member_param_group_id = "group_id",group_delete_member_param_identifier_array = new List<string>{"user_id"}};TIMResult res = TencentIMSDK.GroupDeleteMember(param, (int code, string desc, List<GroupDeleteMemberResult> result, string user_data)=>{// Process the async logic});
GroupModifyMemberInfo
(Details) to set a group member in a public group (Public) or meeting group (Meeting) as the admin.GroupTipsEventCallback
callback (Details).GroupModifyMemberInfoParam param = new GroupModifyMemberInfoParam{group_modify_member_info_group_id = "group_id",group_modify_member_info_identifier = "user_id",group_modify_member_info_modify_flag = TIMGroupMemberModifyInfoFlag.kTIMGroupMemberModifyFlag_MemberRole,group_modify_member_info_member_role = TIMGroupMemberRole.kTIMMemberRole_Admin};TIMResult res = TencentIMSDK.GroupModifyMemberInfo(param, (int code, string desc, string user_data)=>{// Process the async logic});
GroupModifyMemberInfo
(Details) to transfer the group ownership to a group member.GroupModifyMemberInfoParam param = new GroupModifyMemberInfoParam{group_modify_member_info_group_id = "group_id",group_modify_member_info_identifier = "user_id",group_modify_member_info_modify_flag = TIMGroupMemberModifyInfoFlag.kTIMGroupMemberModifyFlag_MemberRole,group_modify_member_info_member_role = TIMGroupMemberRole.kTIMMemberRole_Owner};TIMResult res = TencentIMSDK.GroupModifyMemberInfo(param, (int code, string desc, string user_data)=>{// Process the async logic});
TIMResult res = TencentIMSDK.GroupGetOnlineMemberCount("group_id", (int code, string desc, GroupGetOnlineMemberCountResult result, string user_data)=>{// Process the async logic});
Was this page helpful?