Account Data Overview #
In this section we’ll go over how to view account data, privacy right features, the email verification flow, and how to create a custom Email Sender Plugin.
View account information #
To view a player’s account information call AccountRpc.GetAccountV1Request
.
message GetAccountV1Response {
option (pragma_session_type) = PLAYER;
option (pragma_message_type) = RESPONSE;
Fixed128 pragma_social_id = 1;
string email_address = 2;
bool email_verified = 3;
int64 account_created_timestamp_millis = 4;
int64 last_login_timestamp_millis = 5;
DisplayName display_name = 6;
int64 last_display_name_update_timestamp_millis = 7;
repeated GameIdentity game_identities = 8;
repeated IdProviderAccount id_provider_accounts = 9;
}
View social identity information #
To view one player’s identity information, send viewSocialIdentity
with a pragmaSocialId
:
{
"requestId": 1,
"type": "AccountRpc.ViewSocialIdentityV1Request",
"payload": {
"pragmaSocialId": "5c9122c3-63c2-418c-ad28-013d1082ce56"
}
}
Sample response contains socialIdentity
data such as display name, game shard, and identity providers:
{
"sequenceNumber": 0,
"response": {
"requestId": 1,
"type": "AccountRpc.ViewSocialIdentityV1Response",
"payload": {
"socialIdentity": {
"socialIdentity": {
"pragmaSocialId": "5c9122c3-63c2-418c-ad28-013d1082ce56",
"pragmaDisplayName": {
"displayName": "Shane",
"discriminator": "0001"
},
"gameIdentities": [
{
"gameShardId": "00000000-0000-0000-0000-000000000001",
"pragmaPlayerId": "453a711c-81ea-4f9a-b105-b70a7e0c4547"
}
],
"idProviderAccounts": [
{
"idProviderType": "UNSAFE",
"accountId": "test01",
"providerDisplayName": {
"displayName": "test01",
"discriminator": ""
}
}
]
},
"pragmaPersonalId": "8d570f5b-bd08-407e-8e49-e5f20f57ede2",
"tags": [
{
"tagId": "37d17939-bf50-41ee-ba7a-2040e876e099",
"tag": "UnsafeUser"
}
],
"emailAddress": "",
"emailVerified": false
}
}
}
}
View batches of player and social identity information #
To view a batch of player identity information, use the following calls, which are only available for Operator, Partner, and Service sessions.
These calls provide a list of player or social identities given a list of player IDs or social IDs.
The identities returned will include ID Provider information, so use caution when exposing this data.
Operator:
AccountRpc.GetPlayerIdentitiesOperatorV1Request
AccountRpc.GetSocialIdentitiesOperatorV1Request
Service:
AccountRpc.GetPlayerIdentitiesServiceV1Request
AccountRpc.GetSocialIdentitiesServiceV1Request
Partner:
AccountRpc.GetPlayerIdentitiesPartnerV1Request
AccountRpc.GetSocialIdentitiesPartnerV1Request
Partner calls can be accessed via the SDK:
Player identities
void GetPlayerIdentities(
const TArray<FString> PlayerIds,
const FGetPlayerIdentitiesDelegate& OnComplete
);
TFuture<TPragmaResult<PlayerIdentitiesResponse>> GetPlayerIdentities(
const TArray<FString> PlayerIds
);
Social identities
void GetSocialIdentities(
const TArray<FString> SocialIds,
const FGetSocialIdentitiesDelegate& OnComplete
);
TFuture<TPragmaResult<SocialIdentitiesResponse>> GetSocialIdentities(
const TArray<FString> SocialIds
);
Player identities
public Future<PlayerIdentitiesResponse> GetPlayerIdentities(
IEnumerable<PragmaId> playerIds
)
Social identities
public Future<SocialIdentitiesResponse> GetSocialIdentities(
IEnumerable<PragmaId> socialIds
)