跳到主要内容

Client PlayerProfile API Reference

Player Info is the core attribute collection used to describe a player.

API List

APIDescription
GetMyInfoQuery the current player's profile.
SetMyNameUpdate current player's display name.
SetMyAvatarUpdate the current player's avatar
SetMyLanguageUpdate the current player's language
SetMyGenderUpdate the current player's gender
GetPlayerInfoQuery a player's info
BatchGetPlayerInfoPerform a batch query of player info for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
GetOneOfMyKVDataQuery the specified kvdata of the current player.
GetMyKVDataQuery certain kvdata of the current player.
GetAllOfMyKVDataQuery all accessible kvdata of the current player.
GetMyPublicKVDataQuery all public kvdata of the current player.
GetMyGroupKVDataQuery the specified group kvdata of the current player. Keys in the group that are not accessible to the current player will be ignored.
SetOneOfMyKVDataUpdate the specified kvdata of the current player.
SetMyKVDataUpdate kvdata of the current player. The update operation for a player's KVData will either succeed as a whole or fail as a whole.
IncrOneOfMyKVDataPerform atomic increment operation on a specific kvdata item for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.
IncrMyKVDataPerform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.
IncrMyKVDataIdempotentPerform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.
GetOneOfPlayerKVDataQuery the specified kvdata of the specified player.
GetPlayerKVDataQuery certain kvdata of the specified player.
BatchGetPlayerKVDataPerform a batch query of KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
GetPlayerPublicKVDataQuery all public kvdata of the specified player.
BatchGetPlayerPublicKVDataPerform a batch query of public KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
GetPlayerGroupKVDataQuery the specified group kvdata of the specified player. Keys in the group that are not accessible to the current player will be ignored.
BatchGetPlayerGroupKVDataPerform a batch query of the specified group KVData for multiple players (max 100 players). Keys in the group that are not accessible to the current player will be ignored. If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
GetMyVersionedKVDataQuery certain versioned kvdata of the current player. The keys to be queried must contain at least one versioned key. Call 'GetMyKVData' or 'GetPlayerKVData' instead if you don't need to get the 'version' field, which is only needed when updating versioned KVData.
SetMyVersionedKVDataUpdate versioned kvdata for the current player. The KVData of the player to be updated must contain at least one versioned key. The 'version' needs to pass in can be obtained from the 'GetMyVersionedKVData' API call. If the 'version' passed in is the latest, the callback will return success along with the updated data. If the 'version' passed in is not the latest, the callback will return failure(err_code=11108, kBackendKVDataVersionMismatched (11108)) along with the current latest data, you may try again with the latest version. For other errors, please refer to the error message and the developer manual on the portal, and the callback data is invalid.
SetMyPresenceUpdate current player's presence.
GetMyPresenceQuery current player's presence.
GetPlayerPresenceQuery a player's presence.
BatchGetPlayerPresenceQuery multiple players' presence. (max 100 players)
GetPlayerProfileQuery a player's profile, including player information, relationship information, etc.
BatchOpenIDToPlatformPlayerInfoBatch transform account openID of external platform to platform playerInfo of PGOS. (max 100 openIDs, and FAS openid is not supported)
BatchAccountIDToPlayerIDBatch transform account ID of external platform to player ID of PGOS. (max 2000 account IDs)

API Details

GetMyInfo

Query the current player's profile.

/**
* Query the current player's profile.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMyInfo(
TFunction<void(const FPgosResult& Ret, const FPgosPlayerDetail* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerDetail* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyName

Update current player's display name.

/**
* Update current player's display name.
*
* @param DisplayName Set the current player's display name. The display name length is limited to 2 to 64 characters.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyName(
const FString& DisplayName,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
DisplayNameconst FString&Set the current player's display name. The display name length is limited to 2 to 64 characters.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyAvatar

Update the current player's avatar

/**
* Update the current player's avatar
*
* @param AvatarUri The new URI of the player avatar.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyAvatar(
const FString& AvatarUri,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
AvatarUriconst FString&The new URI of the player avatar.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyLanguage

Update the current player's language

/**
* Update the current player's language
*
* @param Language The new gender.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyLanguage(
const FString& Language,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Languageconst FString&The new gender.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyGender

Update the current player's gender

/**
* Update the current player's gender
*
* @param Gender The new language.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyGender(
const FString& Gender,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Genderconst FString&The new language.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerInfo

Query a player's info

/**
* Query a player's info
*
* @param PlayerId The player id to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerInfo(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player id to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchGetPlayerInfo

Perform a batch query of player info for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of player info for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds The player_ids to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetPlayerInfo(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerInfoCltRsp* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&The player_ids to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerInfoCltRsp* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetOneOfMyKVData

Query the specified kvdata of the current player.

/**
* Query the specified kvdata of the current player.
*
* @param QueryKey Key to query
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetOneOfMyKVData(
const FString& QueryKey,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
QueryKeyconst FString&Key to query
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetMyKVData

Query certain kvdata of the current player.

/**
* Query certain kvdata of the current player.
*
* @param QueryKeys Keys to query
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMyKVData(
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
QueryKeysconst TArray<FString>&Keys to query
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetAllOfMyKVData

Query all accessible kvdata of the current player.

/**
* Query all accessible kvdata of the current player.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetAllOfMyKVData(
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetMyPublicKVData

Query all public kvdata of the current player.

/**
* Query all public kvdata of the current player.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMyPublicKVData(
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetMyGroupKVData

Query the specified group kvdata of the current player. Keys in the group that are not accessible to the current player will be ignored.

/**
* Query the specified group kvdata of the current player.
* Keys in the group that are not accessible to the current player will be ignored.
*
* @param GroupName Name of the specified group.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMyGroupKVData(
const FString& GroupName,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
GroupNameconst FString&Name of the specified group.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetOneOfMyKVData

Update the specified kvdata of the current player.

/**
* Update the specified kvdata of the current player.
*
* @param Key Key to update
* @param Value The new value can be set to string/int32/int64/float/double.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetOneOfMyKVData(
const FString& Key,
const FPgosKVDataValue& Value,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Keyconst FString&Key to update
Valueconst FPgosKVDataValue&The new value can be set to string/int32/int64/float/double.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyKVData

Update kvdata of the current player. The update operation for a player's KVData will either succeed as a whole or fail as a whole.

/**
* Update kvdata of the current player.
* The update operation for a player's KVData will either succeed as a whole or fail as a whole.
*
* @param Kvdata KVData to update.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyKVData(
const TMap<FString, FPgosKVDataValue>& Kvdata,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Kvdataconst TMap<FString, FPgosKVDataValue>&KVData to update.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

IncrOneOfMyKVData

Perform atomic increment operation on a specific kvdata item for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.

/**
* Perform atomic increment operation on a specific kvdata item for the current player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @param Key Key to operate.
* @param Increment The increment value can be set to int32/int64/float/double.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void IncrOneOfMyKVData(
const FString& Key,
const FPgosKVDataValue& Increment,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Keyconst FString&Key to operate.
Incrementconst FPgosKVDataValue&The increment value can be set to int32/int64/float/double.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

IncrMyKVData

Perform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.

/**
* Perform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @param Increments Increments to update, key: kvdata key, value: increment of the value.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void IncrMyKVData(
const TMap<FString, FPgosKVDataValue>& Increments,
TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Incrementsconst TMap<FString, FPgosKVDataValue>&Increments to update, key: kvdata key, value: increment of the value.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

IncrMyKVDataIdempotent

Perform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys] If the operation is successful, the callback will return the updated data.

/**
* Perform atomic increment operation on multiple kvdata items for the current player. [Only works on Integer/Float type keys]
* If the operation is successful, the callback will return the updated data.
*
* @param Params Params of IncrMyKVDataIdempotent.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void IncrMyKVDataIdempotent(
const FPgosClientIncrMyKVDataIdempotentParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientIncrMyKVDataIdempotentResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientIncrMyKVDataIdempotentParams&Params of IncrMyKVDataIdempotent.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientIncrMyKVDataIdempotentResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetOneOfPlayerKVData

Query the specified kvdata of the specified player.

/**
* Query the specified kvdata of the specified player.
*
* @param PlayerId Player to query.
* @param QueryKey Key to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetOneOfPlayerKVData(
const FString& PlayerId,
const FString& QueryKey,
TFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to query.
QueryKeyconst FString&Key to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosOnePlayerKVData* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerKVData

Query certain kvdata of the specified player.

/**
* Query certain kvdata of the specified player.
*
* @param PlayerId Player to query.
* @param QueryKeys Keys to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerKVData(
const FString& PlayerId,
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to query.
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroupWithFails* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchGetPlayerKVData

Perform a batch query of KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of KVData for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds Players to query.
* @param QueryKeys Keys to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetPlayerKVData(
const TArray<FString>& PlayerIds,
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroupWithFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to query.
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroupWithFails* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerPublicKVData

Query all public kvdata of the specified player.

/**
* Query all public kvdata of the specified player.
*
* @param PlayerId Player to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerPublicKVData(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchGetPlayerPublicKVData

Perform a batch query of public KVData for multiple players (max 100 players). If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of public KVData for multiple players (max 100 players).
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds Players to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetPlayerPublicKVData(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerGroupKVData

Query the specified group kvdata of the specified player. Keys in the group that are not accessible to the current player will be ignored.

/**
* Query the specified group kvdata of the specified player.
* Keys in the group that are not accessible to the current player will be ignored.
*
* @param PlayerId Player to query.
* @param GroupName Name of the specified group.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerGroupKVData(
const FString& PlayerId,
const FString& GroupName,
TFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&Player to query.
GroupNameconst FString&Name of the specified group.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchGetPlayerGroupKVData

Perform a batch query of the specified group KVData for multiple players (max 100 players). Keys in the group that are not accessible to the current player will be ignored. If all player operations are successful, the callback result is success. If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data. If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.

/**
* Perform a batch query of the specified group KVData for multiple players (max 100 players).
* Keys in the group that are not accessible to the current player will be ignored.
* If all player operations are successful, the callback result is success.
* If some player operations succeed while others fail, the callback result is success, and the reasons for the failed players can be obtained from the callback data.
* If all player operations fail, the callback result is failure (kBackendAllFailed (14)), and the reasons for the failed players can be obtained from the callback data.
*
* @param PlayerIds Players to query.
* @param GroupName Name of the specified group.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetPlayerGroupKVData(
const TArray<FString>& PlayerIds,
const FString& GroupName,
TFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&Players to query.
GroupNameconst FString&Name of the specified group.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosBatchPlayerKVDataGroup* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetMyVersionedKVData

Query certain versioned kvdata of the current player. The keys to be queried must contain at least one versioned key. Call 'GetMyKVData' or 'GetPlayerKVData' instead if you don't need to get the 'version' field, which is only needed when updating versioned KVData.

/**
* Query certain versioned kvdata of the current player.
* The keys to be queried must contain at least one versioned key.
* Call 'GetMyKVData' or 'GetPlayerKVData' instead if you don't need to get the 'version' field, which is only needed when updating versioned KVData.
*
* @param QueryKeys Keys to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMyVersionedKVData(
const TArray<FString>& QueryKeys,
TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVerAndFails* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
QueryKeysconst TArray<FString>&Keys to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVerAndFails* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyVersionedKVData

Update versioned kvdata for the current player. The KVData of the player to be updated must contain at least one versioned key. The 'version' needs to pass in can be obtained from the 'GetMyVersionedKVData' API call. If the 'version' passed in is the latest, the callback will return success along with the updated data. If the 'version' passed in is not the latest, the callback will return failure(err_code=11108, kBackendKVDataVersionMismatched (11108)) along with the current latest data, you may try again with the latest version. For other errors, please refer to the error message and the developer manual on the portal, and the callback data is invalid.

/**
* Update versioned kvdata for the current player.
* The KVData of the player to be updated must contain at least one versioned key.
* The 'version' needs to pass in can be obtained from the 'GetMyVersionedKVData' API call.
* If the 'version' passed in is the latest, the callback will return success along with the updated data.
* If the 'version' passed in is not the latest, the callback will return failure(err_code=11108, kBackendKVDataVersionMismatched (11108)) along with the current latest data, you may try again with the latest version.
* For other errors, please refer to the error message and the developer manual on the portal, and the callback data is invalid.
*
* @param Data Versioned kvdata items that need to update. Please set the 'version' field to the latest value you got for the player.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyVersionedKVData(
const FPgosKVDataGroupWithVer& Data,
TFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVer* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Dataconst FPgosKVDataGroupWithVer&Versioned kvdata items that need to update. Please set the 'version' field to the latest value you got for the player.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosKVDataGroupWithVer* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetMyPresence

Update current player's presence.

/**
* Update current player's presence.
*
* @param Presence The new presence, its maximum length is 128 characters.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetMyPresence(
const FString& Presence,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Presenceconst FString&The new presence, its maximum length is 128 characters.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetMyPresence

Query current player's presence.

/**
* Query current player's presence.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetMyPresence(
TFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerPresence

Query a player's presence.

/**
* Query a player's presence.
*
* @param PlayerId The player id to query
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerPresence(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player id to query
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPlayerPresence* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchGetPlayerPresence

Query multiple players' presence. (max 100 players)

/**
* Query multiple players' presence. (max 100 players)
*
* @param PlayerIds A list containing player ID
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetPlayerPresence(
const TArray<FString>& PlayerIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerPresenceRsp* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdsconst TArray<FString>&A list containing player ID
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientBatchGetPlayerPresenceRsp* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerProfile

Query a player's profile, including player information, relationship information, etc.

/**
* Query a player's profile, including player information, relationship information, etc.
*
* @param PlayerId The player id to query
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerProfile(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosClientGetPlayerProfileResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The player id to query
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientGetPlayerProfileResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchOpenIDToPlatformPlayerInfo

Batch transform account openID of external platform to platform playerInfo of PGOS. (max 100 openIDs, and FAS openid is not supported)

/**
* Batch transform account openID of external platform to platform playerInfo of PGOS. (max 100 openIDs, and FAS openid is not supported)
*
* @param AccountOpenIds Account openIDs of external platform such as Steam.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchOpenIDToPlatformPlayerInfo(
const TArray<FString>& AccountOpenIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientPlatformPlayerInfoMap* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
AccountOpenIdsconst TArray<FString>&Account openIDs of external platform such as Steam.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientPlatformPlayerInfoMap* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchAccountIDToPlayerID

Batch transform account ID of external platform to player ID of PGOS. (max 2000 account IDs)

/**
* Batch transform account ID of external platform to player ID of PGOS. (max 2000 account IDs)
*
* @param AccountIds Account IDs of external platform such as PS5.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchAccountIDToPlayerID(
const TArray<FString>& AccountIds,
TFunction<void(const FPgosResult& Ret, const FPgosClientBatchAccountIDToPlayerIDResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
AccountIdsconst TArray<FString>&Account IDs of external platform such as PS5.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientBatchAccountIDToPlayerIDResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void