Skip to main content

Client Group API Reference

PGOS Group is a service to create a persistent grouping mechanism for players to chat and interact with each other. A player can create or join in multiple groups. Roles of group members are provided to implement various group management features.

API List

APIDescription
CreateGroupCreat a new group.
SearchGroupSearch for groups that meet the specified criteria.
GetMyGroupListGet all my joined groups
GetGroupInfoGet information for the group. These data can be accessed by non-group members.
BatchGetGroupInfoGet information for batch of groups (max 100 groups). These data can be accessed by non-group members.
GetGroupDetailGet detail information for the group. These data can only be accessed by group members.
BatchGetGroupDetailGet detail information for batch of groups (max 100 groups). These data can only be accessed by group members.
GetGroupMembersGet members for the group.
GetGroupMemberGet a member of a group.
JoinGroupRequest to join a group. The request will failed if the join rule of the group is not Anyone.
LeaveGroupLeave the group.
InvitePlayersToGroupInvite some players to the group. Each player be invited will receive a OnGroupInvitation event.
GetGroupInvitationsGet a list of group invitations which is neither be rejected nor be accepted.
AcceptGroupInvitationAccept a group invitation.
RejectGroupInvitationReject a group invitation.
SetMyGroupNicknameSet player's nickname of the group.
SetGroupNameSet name of the group. Group name could only be set by the group owner.
SetGroupIconSet icon info of the group. Group icon could only be set by the group owner.
SetGroupDescSet description of the group. Group description could only be set by the group owner or administrator.
SetGroupAnnouncementSet announcement of the group. Group announcement could only be set by the group owner or administrator.
SetGroupTagsSet tags of the group. Group tags could only be set by the group owner or administrator.
SetGroupJoinRuleSet join rule of the group. Group join rule could only be set by the group owner or administrator.
SetGroupPublicSet public strategy of the group. Group public strategy could only be set by the group owner or administrator.
SetGroupMemberRemarkGroup owner and group administrator could use this api to set a group member's remark.
BatchSetGroupMemberRemarkBatch set remark for group members (max 100 players).
RemoveGroupMemberRemove a group member from the group.
BatchRemoveGroupMembersRemove a list of group members from the group. (max 100 players)
MuteGroupMemberMute a group member of the group. The muted group member cannot send message to group chat.
UnmuteGroupMemberUnmute a group member of the group.
TransferGroupOwnershipTransfer group ownership to a group member.
GrantGroupAdminGrant group administrator rights to a group member.
RevokeGroupAdminRevoke group administrator rights from a group member.
GetGroupDiscoveryListPaging to get the number of group discoveries. You can additionally obtain the specified number of recommendation groups configured on the portal.
DismissGroupDismiss the group.
SendGroupTextMsgSend group chat text message
SendGroupCustomMsgSend group chat custom message
GetGroupMsgListGet chat message list in a group
ActiveGroupChatSet the current group chat. When setting, OnUnreadGroupMsgCountNotifyEvt will be pushed, and subsequent group chat messages currently in progress are automatically marked as read
GetActiveGroupChatGet the current group chat.
GetGroupMentionedInfoGet latest record mentioning me in the group.
ClearGroupMentionedInfoClear record mentioning me in the group.
ClearGroupUnreadCountMark messages in group as all read
ClearGroupChatMsgClear the group's local message records
SetGroupGlobalCustomDataAdd or modify global custom data of a group. For group owner or administrators only.
DelGroupGlobalCustomDataDelete keys from global custom data of a group. For group owner or administrators only.
ClearGroupGlobalCustomDataClear all global custom data of a group. For group owner or administrators only.
SetGroupMyPlayerCustomDataModify group custom data for custom player.
BatchSetGroupPlayerCustomDataModify group custom data for batch players (max 1000 players). Only group owner and administrators can modify other people's group custom data.

Event List

EventDescription
SetOnGroupInvitationThe event will be triggered when received a group invitation.
SetOnRemovedFromGroupThe event will be triggered when player is removed from the group.
SetOnMutedInGroupThe event will be triggered when player is muted in the group.
SetOnUnmutedInGroupThe event will be triggered when player is unmuted in the group.
SetOnGroupDismissedThe event will be triggered when the group is dismissed by group owner.
SetOnBadgeNumOfGroupInvitationThe event will be triggered when player login PGOS or the list of group invitation received changes.
SetOnUnreadGroupMsgCountNotifyThe event will be triggered after login PGOS and when the unread count of group message changed.
SetOnReceiveGroupMsgThe event will be triggered when receive group chat message.
SetOnGroupNewMentionedThe event will be triggered when a new mention of a group is received.
SetOnGlobalCustomDataChangedThe event will be triggered when group global custom data changed.
SetOnPlayerCustomDataChangedThe event will be triggered when a group member custom changed.

API Details

CreateGroup

Creat a new group.

/**
* Creat a new group.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void CreateGroup(
const CreateGroupParams& params,
PgosDataCallback<GroupDetail> result_callback);

Parameters:

ParamTypeDescription
paramsconst CreateGroupParams&
result_callbackPgosDataCallback<GroupDetail>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SearchGroup

Search for groups that meet the specified criteria.

/**
* Search for groups that meet the specified criteria.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SearchGroup(
const SearchGroupParams& params,
PgosDataCallback<SearchGroupRsp> result_callback);

Parameters:

ParamTypeDescription
paramsconst SearchGroupParams&
result_callbackPgosDataCallback<SearchGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetMyGroupList

Get all my joined groups

/**
* Get all my joined groups
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetMyGroupList(
PgosDataCallback<GetMyGroupListResult> result_callback);

Parameters:

ParamTypeDescription
result_callbackPgosDataCallback<GetMyGroupListResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupInfo

Get information for the group. These data can be accessed by non-group members.

/**
* Get information for the group. These data can be accessed by non-group members.
*
* @param group_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupInfo(
const pgos::pstring& group_id,
PgosDataCallback<GroupInfo> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
result_callbackPgosDataCallback<GroupInfo>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchGetGroupInfo

Get information for batch of groups (max 100 groups). These data can be accessed by non-group members.

/**
* Get information for batch of groups (max 100 groups). These data can be accessed by non-group members.
*
* @param group_ids
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetGroupInfo(
const pgos::pvector<pgos::pstring>& group_ids,
PgosDataCallback<BatchGetGroupInfoRsp> result_callback);

Parameters:

ParamTypeDescription
group_idsconst std::vector<std::string>&
result_callbackPgosDataCallback<BatchGetGroupInfoRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupDetail

Get detail information for the group. These data can only be accessed by group members.

/**
* Get detail information for the group. These data can only be accessed by group members.
*
* @param group_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupDetail(
const pgos::pstring& group_id,
PgosDataCallback<GroupDetail> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
result_callbackPgosDataCallback<GroupDetail>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchGetGroupDetail

Get detail information for batch of groups (max 100 groups). These data can only be accessed by group members.

/**
* Get detail information for batch of groups (max 100 groups). These data can only be accessed by group members.
*
* @param group_ids
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchGetGroupDetail(
const pgos::pvector<pgos::pstring>& group_ids,
PgosDataCallback<BatchGetGroupDetailRsp> result_callback);

Parameters:

ParamTypeDescription
group_idsconst std::vector<std::string>&
result_callbackPgosDataCallback<BatchGetGroupDetailRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupMembers

Get members for the group.

/**
* Get members for the group.
*
* @param group_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupMembers(
const pgos::pstring& group_id,
PgosDataCallback<GetGroupMembersRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
result_callbackPgosDataCallback<GetGroupMembersRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupMember

Get a member of a group.

/**
* Get a member of a group.
*
* @param group_id
* @param player_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupMember(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
PgosDataCallback<GetGroupMemberRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
player_idconst std::string&
result_callbackPgosDataCallback<GetGroupMemberRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

JoinGroup

Request to join a group. The request will failed if the join rule of the group is not Anyone.

/**
* Request to join a group. The request will failed if the join rule of the group is not Anyone.
*
* @param group_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void JoinGroup(
const pgos::pstring& group_id,
PgosDataCallback<GroupDetail> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
result_callbackPgosDataCallback<GroupDetail>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

LeaveGroup

Leave the group.

/**
* Leave the group.
*
* @param group_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void LeaveGroup(
const pgos::pstring& group_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

InvitePlayersToGroup

Invite some players to the group. Each player be invited will receive a OnGroupInvitation event.

/**
* Invite some players to the group. Each player be invited will receive a OnGroupInvitation event.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void InvitePlayersToGroup(
const InvitePlayersToGroupParams& params,
PgosDataCallback<InvitePlayersToGroupRsp> result_callback);

Parameters:

ParamTypeDescription
paramsconst InvitePlayersToGroupParams&
result_callbackPgosDataCallback<InvitePlayersToGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupInvitations

Get a list of group invitations which is neither be rejected nor be accepted.

/**
* Get a list of group invitations which is neither be rejected nor be accepted.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupInvitations(
PgosDataCallback<pgos::pvector<GroupInvitation>> result_callback);

Parameters:

ParamTypeDescription
result_callbackPgosDataCallback<std::vector<GroupInvitation>>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

AcceptGroupInvitation

Accept a group invitation.

/**
* Accept a group invitation.
*
* @param group_id
* @param invitation_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void AcceptGroupInvitation(
const pgos::pstring& group_id,
const pgos::pstring& invitation_id,
PgosDataCallback<AcceptGroupInvitationRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
invitation_idconst std::string&
result_callbackPgosDataCallback<AcceptGroupInvitationRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RejectGroupInvitation

Reject a group invitation.

/**
* Reject a group invitation.
*
* @param group_id
* @param invitation_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RejectGroupInvitation(
const pgos::pstring& group_id,
const pgos::pstring& invitation_id,
PgosDataCallback<RejectGroupInvitationRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
invitation_idconst std::string&
result_callbackPgosDataCallback<RejectGroupInvitationRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetMyGroupNickname

Set player's nickname of the group.

/**
* Set player's nickname of the group.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetMyGroupNickname(
const SetMyGroupNicknameParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst SetMyGroupNicknameParams&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupName

Set name of the group. Group name could only be set by the group owner.

/**
* Set name of the group. Group name could only be set by the group owner.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupName(
const SetGroupNameParams& params,
PgosDataCallback<UpdateGroupRsp> result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupNameParams&
result_callbackPgosDataCallback<UpdateGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupIcon

Set icon info of the group. Group icon could only be set by the group owner.

/**
* Set icon info of the group. Group icon could only be set by the group owner.
*
* @param group_id
* @param group_icon
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupIcon(
const pgos::pstring& group_id,
const pgos::pstring& group_icon,
PgosDataCallback<UpdateGroupRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
group_iconconst std::string&
result_callbackPgosDataCallback<UpdateGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupDesc

Set description of the group. Group description could only be set by the group owner or administrator.

/**
* Set description of the group. Group description could only be set by the group owner or administrator.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupDesc(
const SetGroupDescParams& params,
PgosDataCallback<UpdateGroupRsp> result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupDescParams&
result_callbackPgosDataCallback<UpdateGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupAnnouncement

Set announcement of the group. Group announcement could only be set by the group owner or administrator.

/**
* Set announcement of the group. Group announcement could only be set by the group owner or administrator.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupAnnouncement(
const SetGroupAnnouncementParams& params,
PgosDataCallback<UpdateGroupRsp> result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupAnnouncementParams&
result_callbackPgosDataCallback<UpdateGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupTags

Set tags of the group. Group tags could only be set by the group owner or administrator.

/**
* Set tags of the group. Group tags could only be set by the group owner or administrator.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupTags(
const SetGroupTagsParams& params,
PgosDataCallback<GroupDetail> result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupTagsParams&
result_callbackPgosDataCallback<GroupDetail>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupJoinRule

Set join rule of the group. Group join rule could only be set by the group owner or administrator.

/**
* Set join rule of the group. Group join rule could only be set by the group owner or administrator.
*
* @param group_id
* @param join_rule
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupJoinRule(
const pgos::pstring& group_id,
GroupJoinRule join_rule,
PgosDataCallback<UpdateGroupRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
join_ruleGroupJoinRule
result_callbackPgosDataCallback<UpdateGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupPublic

Set public strategy of the group. Group public strategy could only be set by the group owner or administrator.

/**
* Set public strategy of the group. Group public strategy could only be set by the group owner or administrator.
*
* @param group_id
* @param is_public
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupPublic(
const pgos::pstring& group_id,
bool is_public,
PgosDataCallback<UpdateGroupRsp> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
is_publicbool
result_callbackPgosDataCallback<UpdateGroupRsp>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupMemberRemark

Group owner and group administrator could use this api to set a group member's remark.

/**
* Group owner and group administrator could use this api to set a group member's remark.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupMemberRemark(
const SetGroupMemberRemarkParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupMemberRemarkParams&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchSetGroupMemberRemark

Batch set remark for group members (max 100 players).

/**
* Batch set remark for group members (max 100 players).
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchSetGroupMemberRemark(
const BatchSetGroupMemberRemarkParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst BatchSetGroupMemberRemarkParams&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RemoveGroupMember

Remove a group member from the group.

/**
* Remove a group member from the group.
*
* @param group_id Group id
* @param player_id Player to remove
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RemoveGroupMember(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&Group id
player_idconst std::string&Player to remove
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchRemoveGroupMembers

Remove a list of group members from the group. (max 100 players)

/**
* Remove a list of group members from the group. (max 100 players)
*
* @param group_id Group id
* @param player_ids Players to remove
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchRemoveGroupMembers(
const pgos::pstring& group_id,
const pgos::pvector<pgos::pstring>& player_ids,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&Group id
player_idsconst std::vector<std::string>&Players to remove
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

MuteGroupMember

Mute a group member of the group. The muted group member cannot send message to group chat.

/**
* Mute a group member of the group. The muted group member cannot send message to group chat.
*
* @param group_id
* @param player_id
* @param mute_duration_minutes The duration of the member has been muted. 0 means muted forever.
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void MuteGroupMember(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
const uint32_t mute_duration_minutes,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
player_idconst std::string&
mute_duration_minutesconst uint32_tThe duration of the member has been muted. 0 means muted forever.
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

UnmuteGroupMember

Unmute a group member of the group.

/**
* Unmute a group member of the group.
*
* @param group_id
* @param player_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void UnmuteGroupMember(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
player_idconst std::string&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

TransferGroupOwnership

Transfer group ownership to a group member.

/**
* Transfer group ownership to a group member.
*
* @param group_id
* @param player_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void TransferGroupOwnership(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
player_idconst std::string&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GrantGroupAdmin

Grant group administrator rights to a group member.

/**
* Grant group administrator rights to a group member.
*
* @param group_id
* @param player_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GrantGroupAdmin(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
player_idconst std::string&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

RevokeGroupAdmin

Revoke group administrator rights from a group member.

/**
* Revoke group administrator rights from a group member.
*
* @param group_id
* @param player_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void RevokeGroupAdmin(
const pgos::pstring& group_id,
const pgos::pstring& player_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
player_idconst std::string&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupDiscoveryList

Paging to get the number of group discoveries. You can additionally obtain the specified number of recommendation groups configured on the portal.

/**
* Paging to get the number of group discoveries. You can additionally obtain the specified number of recommendation groups configured on the portal.
*
* @param params
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupDiscoveryList(
const GetGroupDiscoveryListParams& params,
PgosDataCallback<GetGroupDiscoveryListResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst GetGroupDiscoveryListParams&
result_callbackPgosDataCallback<GetGroupDiscoveryListResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

DismissGroup

Dismiss the group.

/**
* Dismiss the group.
*
* @param group_id
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void DismissGroup(
const pgos::pstring& group_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SendGroupTextMsg

Send group chat text message

/**
* Send group chat text message
*
* @param params Request struct for sending text message
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SendGroupTextMsg(
const SendGroupMsgParams& params,
PgosDataCallback<SendGroupMsgResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst SendGroupMsgParams&Request struct for sending text message
result_callbackPgosDataCallback<SendGroupMsgResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SendGroupCustomMsg

Send group chat custom message

/**
* Send group chat custom message
*
* @param params Request struct for sending custom message
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SendGroupCustomMsg(
const SendGroupMsgParams& params,
PgosDataCallback<SendGroupMsgResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst SendGroupMsgParams&Request struct for sending custom message
result_callbackPgosDataCallback<SendGroupMsgResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

GetGroupMsgList

Get chat message list in a group

/**
* Get chat message list in a group
*
* @param group_id The group ID
* @param start_seq The start sequence number of the message to query, 0 means start from the latest message.
* @param count The count of message to get
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void GetGroupMsgList(
const pgos::pstring& group_id,
int64_t start_seq,
int32_t count,
PgosDataCallback<GetGroupChatMsgListResult> result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&The group ID
start_seqint64_tThe start sequence number of the message to query, 0 means start from the latest message.
countint32_tThe count of message to get
result_callbackPgosDataCallback<GetGroupChatMsgListResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

ActiveGroupChat

Set the current group chat. When setting, OnUnreadGroupMsgCountNotifyEvt will be pushed, and subsequent group chat messages currently in progress are automatically marked as read

/**
* Set the current group chat. When setting, OnUnreadGroupMsgCountNotifyEvt will be pushed, and subsequent group chat messages currently in progress are automatically marked as read
*
* @param group_id The group to set as active
*/
void ActiveGroupChat(
const pgos::pstring& group_id);

Parameters:

ParamTypeDescription
group_idconst std::string&The group to set as active

Return: void

GetActiveGroupChat

Get the current group chat.

/**
* Get the current group chat.
*
* @return Player ID of current group chat
*/
pgos::pstring GetActiveGroupChat();

Parameters:

(No parameters)

Return: pgos::pstring

Player ID of current group chat

GetGroupMentionedInfo

Get latest record mentioning me in the group.

/**
* Get latest record mentioning me in the group.
*
* @param group_id Group ID.
* @param dst The latest record mentioned me.
* @return True if there are any mentions of me.
*/
bool GetGroupMentionedInfo(
const pgos::pstring& group_id,
GroupMentionedInfo& dst);

Parameters:

ParamTypeDescription
group_idconst std::string&Group ID.
dstGroupMentionedInfo&The latest record mentioned me.

Return: bool

True if there are any mentions of me.

ClearGroupMentionedInfo

Clear record mentioning me in the group.

/**
* Clear record mentioning me in the group.
*
* @param group_id Group ID. If empty, it means all groups
*/
void ClearGroupMentionedInfo(
const pgos::pstring& group_id);

Parameters:

ParamTypeDescription
group_idconst std::string&Group ID. If empty, it means all groups

Return: void

ClearGroupUnreadCount

Mark messages in group as all read

/**
* Mark messages in group as all read
*
* @param group_id The group ID. If empty, it means all groups
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ClearGroupUnreadCount(
const pgos::pstring& group_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&The group ID. If empty, it means all groups
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

ClearGroupChatMsg

Clear the group's local message records

/**
* Clear the group's local message records
*
* @param group_id The group ID. If empty, it means all groups
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ClearGroupChatMsg(
const pgos::pstring& group_id,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
group_idconst std::string&The group ID. If empty, it means all groups
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupGlobalCustomData

Add or modify global custom data of a group. For group owner or administrators only.

/**
* Add or modify global custom data of a group. For group owner or administrators only.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupGlobalCustomData(
const SetGroupGlobalCustomDataParams& params,
PgosDataCallback<SetGroupGlobalCustomDataResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupGlobalCustomDataParams&
result_callbackPgosDataCallback<SetGroupGlobalCustomDataResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

DelGroupGlobalCustomData

Delete keys from global custom data of a group. For group owner or administrators only.

/**
* Delete keys from global custom data of a group. For group owner or administrators only.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void DelGroupGlobalCustomData(
const DelGroupGlobalCustomDataParams& params,
PgosDataCallback<DelGroupGlobalCustomDataResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst DelGroupGlobalCustomDataParams&
result_callbackPgosDataCallback<DelGroupGlobalCustomDataResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

ClearGroupGlobalCustomData

Clear all global custom data of a group. For group owner or administrators only.

/**
* Clear all global custom data of a group. For group owner or administrators only.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void ClearGroupGlobalCustomData(
const ClearGroupGlobalCustomDataParams& params,
PgosCallback result_callback);

Parameters:

ParamTypeDescription
paramsconst ClearGroupGlobalCustomDataParams&
result_callbackPgosCallbackThe result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

SetGroupMyPlayerCustomData

Modify group custom data for custom player.

/**
* Modify group custom data for custom player.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void SetGroupMyPlayerCustomData(
const SetGroupMyPlayerCustomDataParams& params,
PgosDataCallback<SetGroupMyPlayerCustomDataResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst SetGroupMyPlayerCustomDataParams&
result_callbackPgosDataCallback<SetGroupMyPlayerCustomDataResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

BatchSetGroupPlayerCustomData

Modify group custom data for batch players (max 1000 players). Only group owner and administrators can modify other people's group custom data.

/**
* Modify group custom data for batch players (max 1000 players). Only group owner and administrators can modify other people's group custom data.
*
* @param result_callback The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.
*/
void BatchSetGroupPlayerCustomData(
const BatchSetGroupPlayerCustomDataParams& params,
PgosDataCallback<BatchSetGroupPlayerCustomDataResult> result_callback);

Parameters:

ParamTypeDescription
paramsconst BatchSetGroupPlayerCustomDataParams&
result_callbackPgosDataCallback<BatchSetGroupPlayerCustomDataResult>The result callback after the API execution ends, and it will be called in an ASYNCHRONOUS CHILD THREAD.

Return: void

Event Details

SetOnGroupInvitation

The event will be triggered when received a group invitation.

/**
* OnSetOnGroupInvitation:
* The event will be triggered when received a group invitation.
*
* @param event Event content of group invitation.
*/
void SetOnGroupInvitation(
const GroupInvitationEvt& event);

Parameters:

ParamTypeDescription
eventconst GroupInvitationEvt&Event content of group invitation.

SetOnRemovedFromGroup

The event will be triggered when player is removed from the group.

/**
* OnSetOnRemovedFromGroup:
* The event will be triggered when player is removed from the group.
*
* @param event Event content contains the group of which the player is removed from.
*/
void SetOnRemovedFromGroup(
const RemovedFromGroupEvt& event);

Parameters:

ParamTypeDescription
eventconst RemovedFromGroupEvt&Event content contains the group of which the player is removed from.

SetOnMutedInGroup

The event will be triggered when player is muted in the group.

/**
* OnSetOnMutedInGroup:
* The event will be triggered when player is muted in the group.
*
* @param event Event content contains the group in which the player is muted.
*/
void SetOnMutedInGroup(
const MutedInGroupEvt& event);

Parameters:

ParamTypeDescription
eventconst MutedInGroupEvt&Event content contains the group in which the player is muted.

SetOnUnmutedInGroup

The event will be triggered when player is unmuted in the group.

/**
* OnSetOnUnmutedInGroup:
* The event will be triggered when player is unmuted in the group.
*
* @param event Event content contains the group in which the player is unmuted.
*/
void SetOnUnmutedInGroup(
const UnmutedInGroupEvt& event);

Parameters:

ParamTypeDescription
eventconst UnmutedInGroupEvt&Event content contains the group in which the player is unmuted.

SetOnGroupDismissed

The event will be triggered when the group is dismissed by group owner.

/**
* OnSetOnGroupDismissed:
* The event will be triggered when the group is dismissed by group owner.
*
* @param event Event content contains the group which is dismissed.
*/
void SetOnGroupDismissed(
const GroupDismissedEvt& event);

Parameters:

ParamTypeDescription
eventconst GroupDismissedEvt&Event content contains the group which is dismissed.

SetOnBadgeNumOfGroupInvitation

The event will be triggered when player login PGOS or the list of group invitation received changes.

/**
* OnSetOnBadgeNumOfGroupInvitation:
* The event will be triggered when player login PGOS or the list of group invitation received changes.
*
* @param event .
*/
void SetOnBadgeNumOfGroupInvitation(
const BadgeNumOfGroupInvitationEvt& event);

Parameters:

ParamTypeDescription
eventconst BadgeNumOfGroupInvitationEvt&.

SetOnUnreadGroupMsgCountNotify

The event will be triggered after login PGOS and when the unread count of group message changed.

/**
* OnSetOnUnreadGroupMsgCountNotify:
* The event will be triggered after login PGOS and when the unread count of group message changed.
*
* @param event Event result of unread message count changed.
*/
void SetOnUnreadGroupMsgCountNotify(
const UnreadMsgCountNotifyEvt& event);

Parameters:

ParamTypeDescription
eventconst UnreadMsgCountNotifyEvt&Event result of unread message count changed.

SetOnReceiveGroupMsg

The event will be triggered when receive group chat message.

/**
* OnSetOnReceiveGroupMsg:
* The event will be triggered when receive group chat message.
*
* @param event Event result of receive group chat message.
*/
void SetOnReceiveGroupMsg(
const ReceiveGroupMsgEvt& event);

Parameters:

ParamTypeDescription
eventconst ReceiveGroupMsgEvt&Event result of receive group chat message.

SetOnGroupNewMentioned

The event will be triggered when a new mention of a group is received.

/**
* OnSetOnGroupNewMentioned:
* The event will be triggered when a new mention of a group is received.
*
* @param event Event results received for new group mentions.
*/
void SetOnGroupNewMentioned(
const GroupNewMentionedEvt& event);

Parameters:

ParamTypeDescription
eventconst GroupNewMentionedEvt&Event results received for new group mentions.

SetOnGlobalCustomDataChanged

The event will be triggered when group global custom data changed.

/**
* OnSetOnGlobalCustomDataChanged:
* The event will be triggered when group global custom data changed.
*
* @param event Event data for GlobalCustomDataChanged.
*/
void SetOnGlobalCustomDataChanged(
const GroupGlobalCustomDataChangedEvt& event);

Parameters:

ParamTypeDescription
eventconst GroupGlobalCustomDataChangedEvt&Event data for GlobalCustomDataChanged.

SetOnPlayerCustomDataChanged

The event will be triggered when a group member custom changed.

/**
* OnSetOnPlayerCustomDataChanged:
* The event will be triggered when a group member custom changed.
*
* @param event Event data for PlayerCustomDataChanged.
*/
void SetOnPlayerCustomDataChanged(
const GroupPlayerCustomDataChangedEvt& event);

Parameters:

ParamTypeDescription
eventconst GroupPlayerCustomDataChangedEvt&Event data for PlayerCustomDataChanged.