inviteUserToGroup
Introduction
Invite other user to the group.
Parameter details
Parameter name |
Parameter type |
Required |
Platform |
Description |
groupID |
String |
yes |
All |
The group ID. |
userList |
List< String > |
yes |
All |
The list of user IDs to invite. |
Returned template
V2TimValueCallback<List<V2TimGroupMemberOperationResult>>
{
code : int
desc : String
data : List<V2TimGroupMemberOperationResult>
}
Return value details
name |
type |
description |
code |
int |
Request result: Error codes. 0 means success. |
desc |
String |
The description of the error. It will be empty if success. |
data |
List< V2TimGroupMemberOperationResult > |
The list of invitation results. |
Code example
V2TimValueCallback<List<V2TimGroupMemberOperationResult>>
inviteUserToGroupRes = await TencentImSDKPlugin.v2TIMManager
.getGroupManager()
.inviteUserToGroup(
groupID: "groupID",
userList: [],
);
if (inviteUserToGroupRes.code == 0) {
inviteUserToGroupRes.data?.forEach((element) {
element.memberID;
element.result;
});
}