Team Features

Update time: 2021/12/14 08:29:45

Features of Team

The NIM.Team.TeamAPI class manages the team feature. There are two types of team chat, namely normal team (Normal) and advanced team (Advanced). The advanced team has more operation permissions, and the interfaces are kept consistent under common operations. It is recommended to select one team type only for APP development. In principle, normal team and advanced team cannot be interchanged, since their types have been confirmed at creation. In the current version, advanced team covers all features of normal team, and it is recommended to use advanced team for development.

  • Normal team

Similar to a discussion team or quick group session in the current IM chat application, an ordinary team does not have full team privileges. Each ordinary team can only have one administrator. The administrator can add members to and remove members from a team. Members can add members without the consent of the team members.

  • Advanced team

Advanced team is subject to more limitations on permission which is granted to the owner, manager and team members. To add a new member, his/her acceptance of invitation is required The information of advanced team members may be synced in real time, and team switch setting field and third-party extension field (for storage and pass-through only) and the third-party server extension field (set only via the server interface, and read only to the client) are made available.

  • Comparison of team operation permissions
Team operation Normal team Advanced team
Invite member Anyone Team owner, manager
Kick out member Team owner Team owner, managerr (a manager cannot kick any other manager out)
Dismiss team Team owner Team owner
Leave Anyone Manager, normal members
Process join application / Team owner, manager
Modify your own nickname in the team / Anyone
Modify others' nicknames in the team / Team owner, manager
Modify team name Anyone Team owner, manager
Modify team announcement / Team owner, manager
Modify team introduction / Team owner, manager
Update verification method / Team owner, manager
Add (remove) manager / Team owner
Change the team owner / Team owner
Mute member / Team owner, manager
Update team avatar / Team owner, manager

Team chat message

Other than having their distinctive message type, team chat and double chat are the same in terms of sending, receiving and managing messages. See Message sending and receiving for details.

Team notification event

Registering this event to monitor team information changes, including team creation, dismissal, joining invitation, kick-out, and other relevant operations, the caller will be notified through this event.

NIMTeamEventDataParameter description

Type Parameter Description
NIMTeamEvent TeamEvent Team notification content
NIMNotificationType NotificationId Type of team notification. The field NotificationType under TeamEvent shall be used now, instead of the current field.

NIMTeamEventParameter description

Type Parameter Description
ResponseCode ResponseCode Error code information, seeResponseCodefor details
string TeamId Team id
NIMNotificationType NotificationType Team notification types, including team creation, dismissal, etc. (seeNIMNotificationType for details)
List IdCollection IDs of team members that may be involved in the notification. For example, when adding multiple managers, ids in the received notification would correspond to multiple accounts.
List InvalidIDList Invalid team member ids that may be involved in the notification, including those from joining invitations which have failed due to exceeding the max. number of members.
string Id id of a single member operation, such as that of a muted member or the original owner in a owner change operation.
NIMTeamInfo team_info Team information data
NIMTeamMemberInfo MemberInfo Team member information, such as using notification typekNIMNotificationIdTeamSyncUpdateMemberPropertyto notify self member attribute update
List<User.UserNameCard> OperatorNameCards Namecards of team members that may be related to the notification
int _mute Notification of muting, 1: mute 0: : Dismiss mute

Enumeration type descriptionNIMNotificationType

Enumeration Value Description
kNIMNotificationIdTeamInvite 0 Add user to normal team, {"tinfo":team_info,"ids":["a1", "a2"],"uinfos":["uinfo1", "uinfo2"]}, json string corresponds to data ofNIMTeamEventfiled, same below
kNIMNotificationIdTeamKick 1 Remove user from normal team,{"tinfo":tinfo,"ids":["a1", "a2"],"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamLeave 2 Exit team, {"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamUpdate 3 Update team information, {"tinfo":tinfo,"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamDismiss 4 Dismiss team, {"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamApplyPass 5 Team joining application accepted, {"tinfo":tinfo,"id":"a1","uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamOwnerTransfer 6 Advanced team owner changed, {"id":"a1","uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamAddManager 7 Add manager, {"ids":["a1","a2"],"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamRemoveManager 8 Remove manager, {"ids":["a1","a2"],"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamInviteAccept 9 Join advanced team by accepting invitation, {"tinfo":tinfo,"id":"a1","uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdTeamMuteMember 10 Mute/unmute team members, {"uinfos":["uinfo1", "uinfo2"],"tinfo":tinfo,"id":"a1","mute":1-mute,0-unban}
kNIMNotificationIdNetcallMiss 101 Missed call (not yet supported),{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}
kNIMNotificationIdNetcallBill 102 Call ticket (not yet supported),{"calltype":2,"channel":6146077129466446197,"duration":8,"ids":["id1","id2"],"time":1430995117398}
kNIMNotificationIdTeamSyncCreate 1000 Create team {"tinfo": tinfo}
kNIMNotificationIdTeamMemberChanged 1001 Team member changed {"team_member": team_member_info}
kNIMNotificationIdTeamSyncUpdateMemberProperty 1002 Synchronous notification: Update your own team attributes {"team_member": team_member_info} currently only kNIMTeamUserKeyNick and kNIMTeamUserKeyBits are required. When the notification is received,MemberInfofield will show the updated information
kNIMNotificationIdLocalCreateTeam 2000 Local operation to create group {"ids": ["a1", "a2"]}
kNIMNotificationIdLocalApplyTeam 2001 Local operation to apply for joining the team
kNIMNotificationIdLocalRejectApply 2002 Local operation to reject application {"id":"a1"}
kNIMNotificationIdLocalRejectInvite 2003 Local operation to decline invitation {"id":"a1"}
kNIMNotificationIdLocalUpdateMemberProperty 2004 Local operation to update team member attributes
kNIMNotificationIdLocalUpdateOtherNick 2005 Local operation to update others' nicknames
kNIMNotificationIdLocalGetTeamInfo 2006 Remove user from normal team,{"tinfo":tinfo,"ids":["a1", "a2"],"uinfos":["uinfo1", "uinfo2"]}
kNIMNotificationIdLocalGetTeamList 2007 Local operation to get team member information
kNIMNotificationIdLocalMuteMember 2008 Local operation to mute team members
kNIMNotificationIdLocalNetcallReject 3103 Reject call (not yet supported),{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}
kNIMNotificationIdLocalNetcallNoResponse 3104 No answer, call not connected (not yet supported),{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time ":1430995380471}
  • API prototype
public static EventHandler<NIMTeamEventArgs> TeamEventNotificationHandler;

  • Example
void OnTeamEventNotification(object sender,NIMTeamEventArgs args)
{
	if (args != null && args.Data != null)
    {
    	...
    }
}
//Register event monitoring
NIM.Team.TeamAPI.TeamEventNotificationHandler += OnTeamEventNotification;


//Unregister event monitoring when it is no longer needed
NIM.Team.TeamAPI.TeamEventNotificationHandler -= OnTeamEventNotification;

Get team

Since NIM SDK will synchronize local team messages at the startup, a team may be fetched by calling the local cache interface. SDK provides massive team interfaces required to fetch it and the interfaces required for inquiry according to a team ID. SDK also provides the interfaces for remote access to team messages. ClassNIMTeamInfo encapsulates team information.

NIMTeamInfoParameter description

Type Parameter Description
string TeamId Team id
string Name Team name
NIMTeamType TeamType Team type, including normal team and advanced team. See NIMTeamType.
string OwnerId Owner or creator of the team
int Level Team level
string Property Extension field reserved for team attribute, the length of which is limited to 6000 characters
int IsValid Whether this team is valid, 1 valid, 0 invalid
int MembersCount Number of team members
long MemberListTimetag Timestamp of the latest update of the team member list (in milliseconds)
long CreatedTimetag Team creation timestamp (in milliseconds)
long UpdatedTimetag Timestamp of the latest update of team information (in milliseconds)
int IsMemberValid Whether the list of team members is valid.
string Introduce Team introduction
string Announcement Team announcement
NIMTeamJoinMode JoinMode Mode of joining a team. See NIMTeamJoinMode (for advanced team only).
string Custom Third-party extension field, only for storage and transparent transmission
string ServerCustom Server reserved extension field (this configuration item can only be set by using server interface, it is read-only for the client) (only for advanced team)
string TeamIcon Team avatar
NIMTeamBeInviteMode BeInvitedMode Whether the invitee's consent is required, an attribute that can only be updated by the owner and manager, 0-consent required (default), 1- consent not required (only for advanced team).
NIMTeamInviteMode InvitedMode Who can invite others to join the team,an attribute that can only be updated by the owner and manager, 0-administrator (default), 1-everyone (only for advanced team).
NIMTeamUpdateInfoMode UpdateMode Who can update team information,an attribute that can only be updated by the owner and manager, 0-administrator (default), 1-everyone (only for advanced team).
NIMTeamUpdateCustomMode UpdateCustomMode Who can update custom team attribute, an attribute that can only be updated by the owner and manager (only for advanced team).
int MuteAll Tag for muting all team members 0: not mute all, 1: mute all(only for advanced team) (not supported for now)

Notes: When a user leaves a team, or is removed from the team or the team is dismissed, IsMemberValid will be 0. For the user, the team is not a valid team.

NIMTeamMemberInfoParameter description

Type Parameter Description
string TeamId Team id
string AccountId Team member account
NIMTeamUserType Type Type of team member. See NIMTeamUserType.
long CreatedTimetag Team joining timestamp
long UpdatedTimetag Timestamp of team member information update
bool IsValid Whether the team member is valid or not, should be false if the member has left the team
string NickName Team member nickname
long ConfigBits Configuration attribute, which is only used for setting message tips attribute for setting message tip, see NotifyNewMessage.
string Custom Custom third-party extension information
bool Muted Whether to mute, true: mute, false: unmute (default)
bool NotifyNewMessage Message reminder settings

Get local team list

In the latest version of SDK, when the user is no longer in the team or the group has been dismissed, the corresponding cached data in local database will no longer be cleared, and as a result interfaces for querying valid teams and all teams (including invalid teams) are both provided.

1. Get the list of valid team information

  • API prototype
 public static void QueryMyValidTeamsInfo(QueryMyTeamsInfoResultDelegate action);

  • Parameter Description
Parameter Description
action Notification result callback
  • Example
//Get the list of available team information
NIM.Team.TeamAPI.QueryMyValidTeamsInfo((infoList)=>{
    if (infoList != null)
    {
		...
    }

});

2. Get the list of teams you've joined

Team id list that covers only teams you've joined

  • API prototype
 public static void QueryAllMyTeams(QueryMyTeamsResultDelegate action);

  • Parameter Description
Parameter Description
action Notification result callback
  • Example
//Get the id list of teams you joined
NIM.Team.TeamAPI.QueryAllMyTeams(count,countIdList)=>{
    //Count: Queried team id count, countIdList: Array of team ids
    if (countIdList != null)
    {
		...
    }
});

3. Get the information list of all teams (including invalid teams)

  • API prototype
 public static void QueryAllMyTeamsInfo(QueryMyTeamsInfoResultDelegate action);

  • Parameter Description
Parameter Description
action Notification result callback
  • Example
// Get the information list of all teams
NIM.Team.TeamAPI.QueryAllMyTeamsInfo((infoList)=>{
    if (infoList != null)
    {
		...
    }
});

Get team information

The SDK supports getting local team information synchronously or asynchronously, and also provides an interface for directly getting group information from the cloud.

1. Get local team information (synchronously)

  • API prototype
 public static NIMTeamInfo QueryCachedTeamInfo(string tid);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
  • Example
//Get local team information
string tid = "1243354";
NIMTeamInfo tinfo = NIM.Team.TeamAPI.QueryCachedTeamInfo(tid);

2. Get local team information (asynchronously)

  • API prototype
 public static void QueryCachedTeamInfo(string tid, QueryCachedTeamInfoResultDelegate action);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
action Notification result callback
  • Example
//Get local team information
string tid = "1243354";
NIM.Team.TeamAPI.QueryCachedTeamInfo(tid,(tid,tinfo)=>{
    ....
});

3. Get team information from the cloud

  • API prototype
public static void QueryTeamInfoOnline(string tid, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
action Notification result callback
  • Example
//Get team information from the cloud
string tid = "1243354";
NIM.Team.TeamAPI.QueryTeamInfoOnline(tid,(teamEventData)=>{
    ....
});

Get mute list from the cloud

  • API prototype
 public static void QueryMutedListOnlineAsync(string tid, QueryTeamMutedListDelegate cb);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
action Notification result callback
  • Example
//Get mute list from the cloud
string tid = "1243354";
NIM.Team.TeamAPI.QueryMutedListOnlineAsync(tid,(res,count,id, members)=>{
    ....
});

Team member information

The SDK supports getting team member list information, or only the information of a single team member. To facilitate calling by developers, two interfaces are provided for getting the information of a single team member, one is the synchronous version, the other is the asynchronous version.

Get team member list

The list obtained by this feature covers valid members of a specified team and also local members who have left the team.

  • API prototype
public static void QueryTeamMembersInfo(string tid, bool includeMemberInfo, bool includeInvalidMember, QueryTeamMembersInfoResultDelegate action);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
includeMemberInfo It determines to query information of team members. "True" means to query; "false" means not to query. If you do not query the information of team members, only member ids in the returned list of team members infoList will be valid.
includeInvalidMember It determines to query local members who have left the team. "True" means to query; "false" means not to query.
action Notification result callback
  • Example
//Get member information of valid teams
string tid = "1243354";
NIM.Team.TeamAPI.QueryTeamMembersInfo(tid,true,false(tid,memberCount, includeUserInfo,infoList)=>{
    //infoList: Query information list of returned team members. If includeUserInfo is false, infoList will query member ids only.
    ....
});

Get team member information

1. Get team member information (synchronously)

  • API prototype
 public static NIMTeamMemberInfo QuerySingleMemberInfo(string tid, string uid);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
uid Team member ids to be obtained
  • Example
//Get information of team member test1
string tid = "1243354";
string uid = "test1";
NIMTeamMemberInfo tinfo = NIM.Team.TeamAPI.QuerySingleMemberInfo(tid,uid);

2. Get team member information (asynchronously)

  • API prototype
public static void QuerySingleMemberInfo(string tid, string uid, QuerySingleMemberResultDelegate action);

  • Parameter Description
Parameter Description
tid Team ids to be obtained
uid Team member ids to be obtained
action Notification result callback
  • Example
//Get information of team member test1
string tid = "1243354";
string uid = "test1";
NIM.Team.TeamAPI.QuerySingleMemberInfo(tid,uid,(tinfo)=>{
    ....
});

Create a team

Created teams include normal and advanced teams. In the current version of the SDK, advanced team has all the features of normal team.NIMTeamInfo The detailed information of a team is included. The object can be configured to designate team type, team permission, and team information. If postscript is configured, it will be sent to every member of the team.

  • API prototype
 public static void CreateTeam(NIMTeamInfo teamInfo, string[] idList, string postscript, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
teamInfo Basic information of the created team, including team name, team announcement, etc.
idList When a team is created, user account shall be added, exclusing your account. The system will send invitation to all members in the idList automatically.
postscript Invitation postscript information
action Notification result callback
  • Example
//For example, for test accounts test1, test2
NIMTeamInfo ti = new NIMTeamInfo {
			Name = "teamName",
			Announcement = "Team announcement",
			Introduce = "Team introduction",
			TeamType = NIMTeamType.kNIMTeamTypeAdvanced
		};
string[] ids = new string[]();
ids.add("test1");
ids.add("test2");
NIM.Team.TeamAPI.CreateTeam(ti,ids,"Postscript information",(data)=>{
    ....
});

Join team

Users can join a team actively or passively by accepting invitations.

Team joining invitation

After the request, the invitee of a normal team will directly join the team; for an advanced team, CommsEase server will issue a system message to the target user who may approve or reject the request.

  • API prototype
 public static void Invite(string tid, string[] idList, string postscript, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
idList When creating a team, you need to add user accounts of the team (excluding your own account)
postscript Invitation postscript, if not empty, this information will be notified to the invited user
action Notification result callback
  • Example
//For example, for test accounts test1, test2
string tid = "1231232";
string[] ids = new string[]();
ids.add("test1");
ids.add("test2");
NIM.Team.TeamAPI.Invite(tid,ids,"Postscript information",(data)=>{
    ....
});

Note: In normal team, you need to send a message to the team after inviting the friend, otherwise the friend won't receive the invitation notification.

In advanced team, the user can perform the following operations after receiving the notification:

  • Accept the invitation (only for advanced team):public static void AcceptTeamInvitation(string tid, string invitor, TeamChangedNotificationDelegate action)

Code example

//For example, for inviter account testAccount in test group 1231232
string tid = "1231232";
string invitor_uid = "testAccount";//Fill in inviter id
NIM.Team.TeamAPI.AcceptTeamInvitation(tid,invitor_uid,(data)=>{
    ....
});
  • Refuse the invitation (only for advanced team):public static void RejectTeamInvitation(string tid, string invitor, string reason, TeamChangedNotificationDelegate action)

Code example

//For example, for inviter account testAccount in test group 1231232
string tid = "1231232";
string invitor_uid = "testAccount";//Fill in inviter id
NIM.Team.TeamAPI.RejectTeamInvitation(tid,invitor_uid,"Reason for rejection"(data)=>{
    ....
});

Team joining via active application

After sending the request, CommsEase server will send a system message to the team manager who can either accept or refuse the application. It is only available to advanced team.

  • API prototype
 public static void ApplyForJoiningTeam(string tid, string reason, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
reason Application postscript, if not empty, this information will be notified to the manager of the team
action Notification result callback
  • Example
//Take test team 1231232 as an example
string tid = "1231232";
NIM.Team.TeamAPI.ApplyForJoiningTeam(tid,"Application postscript",(data)=>{
    ....
});

Team managers can proceed to the next operation:

  • Accept application (only for advanced team):public static void AgreeJoinTeamApplication(string tid, string uid, TeamChangedNotificationDelegate action)

Sample code:

//For example, for test account test1 in test team 1231232
string tid = "1231232";
string uid = "test1";//Account ID of applicant
NIM.Team.TeamAPI.AgreeJoinTeamApplication(tid,uid,(data)=>{
    ....
});

  • Reject application (only for advanced team): public static void RejectJoinTeamApplication(string tid, string uid, string reason, TeamChangedNotificationDelegate action)

Sample code:

//For example, for test account test1 in test team 1231232
string tid = "1231232";
string uid = "test1";//Account ID of applicant
string reason = "Because you are not beautiful";//Reason for rejection
NIM.Team.TeamAPI.RejectJoinTeamApplication(tid,uid,reason,(data)=>{
    ....
});

Exit team

There are two types: active withdrawal and passive withdrawal. Both manager and owner have the right to kick out team members. After being kicked out of the team, you will receive a system notification and other users will be notified through team notification event.

  • API prototype
 public static void LeaveTeam(string tid, TeamChangedNotificationDelegate action)

  • Parameter Description
Parameter Description
tid Team ID
action Notification result callback
  • Example
//Take test team 1231232 as an example
string tid = "1231232";
NIM.Team.TeamAPI.LeaveTeam(tid,(data)=>{
    ....
});

Dismiss team

Advanced team owner has the right to dismiss the team, which is not available to all the other members.

  • API prototype
 public static void DismissTeam(string tid, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
action Notification result callback
  • Example
//Take test team 1231232 as an example
string tid = "1231232";
NIM.Team.TeamAPI.DismissTeam(tid,(data)=>{
    ....
});

Remove member

Team owner can kick out any member, and advanced team manager can kick out regular team members.

  • API prototype
 public static void KickMemberOutFromTeam(string tid, string[] idList, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
idList List of removed team members’ ids
action Notification result callback
  • Example
//For example, for test accounts test1 and test2 in test team 1231232
string tid = "1231232";
string[] idList = new string[]();
idList.add("test1");
idList.add("test2");
NIM.Team.TeamAPI.KickMemberOutFromTeam(tid,idList,(data)=>{
    ....
});

Mute team member

It supports to mute and demute normal members by the manager and owner.

  • API prototype
public static void SetMemberMuted(string tid, string memberId, bool muted, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
memberId ids of muted/unmuted team members
muted Whether to mute, true: mute, false: unmute
action Notification result callback
  • Example
//For example, for test account test1 in test team 1231232
string tid = "1231232";
string uid = "test1";
NIM.Team.TeamAPI.SetMemberMuted(tid,uid,true,(data)=>{
    ....
});

Edit team information

All normal team members can update team information such as team name. In advanced team, only the manager can do that.

  • API prototype
public static void UpdateTeamInfo(string tid, NIMTeamInfo info, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
info In team information, only fill in the fields that need to be updated
action Notification result callback
  • Example
//Taking team name update as an example
string tid = "1231232";
NIMTeamInfo ti = new NIMTeamInfo
{ 
    TeamId = tid,
    Name = "newTeamName"
};
NIM.Team.TeamAPI.UpdateTeamInfo(tid,ti,(data)=>{
    ....
});

Update team member information

The SDK allows the manager to change the nicknames of others in the team, and it also allows users to update their own information in the team

Update member information of oneself

Team members can update their own member information.

  • API prototype
public static void UpdateMyTeamProperty(NIMTeamMemberInfo info, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
info Team member information. It’s best to get the complete team member information through the interface first, then update the values in fields that need to be updated.TeamIdandAccountIdare required.
action Notification result callback
  • Example
//Taking team name update as an example
string tid = "1231232";

// Team member information. It’s best to get the complete team member information through the interface first, then update the values in fields that need to be updated. An example is given here.
NIMTeamMemberInfo tmi = new NIMTeamMemberInfo
{ 
    TeamId = tid,
    NickName = "newNick",
    AccountId = "myUid" //My account ID;
};
NIM.Team.TeamAPI.UpdateMyTeamProperty (tmi, (data)=>
{
	....
});

Update in-team nicknames of other members

Manager and owner can update in-team nicknames of other members

  • API prototype
public static void UpdateMemberNickName(NIMTeamMemberInfo info, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
info Team member information,TeamIdandAccountIdare required,NickNamecan be null
action Notification result callback
  • Example
//Taking team name update as an example
string tid = "1231232";

// Team member information. It’s best to get the complete team member information through the interface first, then update the values in fields that need to be updated. An example is given here.
NIMTeamMemberInfo tmi = new NIMTeamMemberInfo
{ 
    TeamId = tid,
    NickName = "newNick",
    AccountId = "test1" //Account ID of the other party;
};
NIM.Team.TeamAPI.UpdateMemberNickName (tmi, (data)=>
{
	....
});

Team permission management

The SDK provides permission management feature in advanced team, but operation is limited to manager and team owner. Operations include adding, removing manager and changing team owner, etc.

Add manager

Set all in managerIdArray as team managers

  • API prototype
public static void AddTeamManagers(string tid, string[] managerIdArray, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
managerIdArray Array of member account ids
action Notification result callback
  • Example
//For example, for test accounts test1 and test2 in test team 1231232
string tid = "1231232";
string[] idList = new string[]();
idList.add("test1");
idList.add("test2");
NIM.Team.TeamAPI.AddTeamManagers(tid,idList,(data)=>{
    ....
});

Remove manager

Remove all managers in managerIdArray

  • API prototype
public static void RemoveTeamManagers(string tid, string[] managerIdArray, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
managerIdArray Array of member account ids
action Notification result callback
  • Example
//For example, for test accounts test1 and test2 in test team 1231232
string tid = "1231232";
string[] idList = new string[]();
idList.add("test1");
idList.add("test2");
NIM.Team.TeamAPI.RemoveTeamManagers(tid,idList,(data)=>{
    ....
});

Change the team owner

Transfer owner to another members.leaveTeam When set to true, the original owner exits the team after successful owner transfer.

  • API prototype
 public static void TransferTeamAdmin(string tid, string newOwnerId, bool leaveTeam, TeamChangedNotificationDelegate action);

  • Parameter Description
Parameter Description
tid Team ID
leaveTeam Whether the original owner exits the team after successful owner transfer. true: leave after transfer, false: not leave after transfer
newOwnerId New owner's account id
action Notification result callback
  • Example
//For example, for test account test1 in test team 1231232
string tid = "1231232";
string newOwnerId = "test1";
NIM.Team.TeamAPI.TransferTeamAdmin(tid,newOwnerId,true,(data)=>{
    ....
});

Was this page helpful?
Yes
No
  • Features of Team
  • Team chat message
  • Team notification event
  • Get team
  • Get local team list
  • Get team information
  • Get mute list from the cloud
  • Team member information
  • Get team member list
  • Get team member information
  • Create a team
  • Join team
  • Team joining invitation
  • Team joining via active application
  • Exit team
  • Dismiss team
  • Remove member
  • Mute team member
  • Edit team information
  • Update team member information
  • Update member information of oneself
  • Update in-team nicknames of other members
  • Team permission management
  • Add manager
  • Remove manager
  • Change the team owner