AI Integration Quick Reference
AI Integration Quick Reference
- Kick a member from the group
- Ban a member from the group
- Unban a member from the group
- Update the scope of the member of the group
Kick a Group Member
The Admin or Moderator of a group can kick a member out of the group using thekickGroupMember() method.
- Dart
kickGroupMember() takes following parameters:
The kicked user will be no longer part of the group and can not perform any actions in the group, but the kicked user can rejoin the group.
Response
Response
On Success — A
String message confirming the member was kicked:Error
Error
Ban a Group Member
The Admin or Moderator of the group can ban a member from the group using thebanGroupMember() method. Unlike kicked users, banned users cannot rejoin until unbanned.
- Dart
banGroupMember() method takes the following parameters:
The banned user will be no longer part of the group and can not perform any actions in the group. A banned user cannot rejoin the same group without being unbanned.
Response
Response
On Success — A
String message confirming the member was banned:Error
Error
Unban a Banned Group Member from a Group
Only Admin or Moderators of the group can unban a previously banned member from the group using theunbanGroupMember() method.
- Dart
unbanGroupMember() method takes the following parameters
The unbanned user can now rejoin the group.
Response
Response
On Success — A
String message confirming the member was unbanned:Error
Error
Get List of Banned Members for a Group
In order to fetch the list of banned groups members for a group, you can use theBannedGroupMembersRequest class. To use this class i.e to create an object of the BannedGroupMembersRequest class, you need to use the BannedGroupMembersRequestBuilder class. The BannedGroupMembersRequestBuilder class allows you to set the parameters based on which the banned group members are to be fetched.
The BannedGroupMembersRequestBuilder class allows you to set the below parameters:
The GUID of the group for which the banned members are to be fetched must be specified in the constructor of the GroupMembersRequestBuilder class.
Set Limit
This method sets the limit i.e. the number of banned members that should be fetched in a single iteration.- Dart
Set Search Keyword
This method allows you to set the search string based on which the banned group members are to be fetched.- Dart
build() method to get the object of the BannedGroupMembersRequest class.
Once you have the object of the BannedGroupMembersRequest class, you need to call the fetchNext() method. Calling this method will return a list of GroupMember objects containing n number of banned members where n is the limit set in the builder class.
- Dart
Response
Response
On Success — A
List<GroupMember> containing the banned group members for the specified group (each item is a GroupMember object):GroupMember Object (per item in array):Error
Error
Real-Time Group Member Kicked/Banned Events
In other words, as a member of a group, how do I know when someone is banned/kicked when my app is running? Implement theseGroupListener methods to receive real-time notifications:
- Dart
Missed Group Member Kicked/Banned Events
In other words, as a member of a group, how do I know when someone is banned/kicked when my app is not running? When you retrieve the list of previous messages if a member has been kicked/banned/unbanned from any group that the logged-in user is a member of, the list of messages will contain anAction message. An Action message is a sub-class of BaseMessage class.
Kicked event:
Banned event:
Unbanned event:
Next Steps
Add Members
Add new members to your groups
Change Member Scope
Update member roles and permissions
Retrieve Group Members
Fetch the list of members in a group
Leave a Group
Allow members to leave a group