Account Data Overview #
In this section we’ll go over what data is stored in a Pragma Account and how to view account and social identity data.
Pragma Account #
A Pragma Account represents a player and is comprised of the following:
Social ID - A single ID shared across all game shards and game titles. This enables a single social ecosystem across multiple game launches. Associated data includes social identifier, display name, friends list, and ban records.
Player ID - A separate player ID is assigned per game shard. This means an account may have several player IDs across multiple game shards or game titles. A separate ID per shard enables clear paths for data migration. Associated data includes player data, inventory, progression, and loadouts. Player IDs are never associated with sensitive social or personal data. Pragma Engine uses player IDs for events such as party invite and matchmaking.
Personal ID - This ID is reserved for personal data deemed sensitive such as PII (personally identifiable information) which includes email. It is generally recommended to store as little of this kind of information as possible.
Provider ID - This ID is the unique identifier for a player according to the identity provider. A single Pragma Account can be linked to multiple identity providers (Steam, Epic, Playstation) to authenticate into Pragma Engine. This includes data taken from the provider such as a unique associated provider account identifier and the player’s display name and discriminator.
For more details, see the Account Data Reference page.
Display name #
When a Pragma Account is created, the display name is defaulted to the player’s display name from the provider they used to login for the first time. For details on how a player can update their display name, see Update a player’s display name.
The Google identity provider uses an anonymized display name (Player1122
) to protect the player’s PII when creating an account.
View account data #
As a Player send AccountRpc.GetAccountV1Request
to view your player account data:
{
"requestId": 1,
"type": "AccountRpc.GetAccountV1Request",
"payload": { }
}
Below is a sample response with the current player’s account data:
{
"sequenceNumber": 0,
"response": {
"requestId": 1,
"type": "AccountRpc.GetAccountV1Response",
"payload": {
"pragmaSocialId": "5c9122c3-63c2-418c-ad28-013d1082ce56",
"emailAddress": "shane-dev@pragma.gg",
"emailVerified": false,
"accountCreatedTimestampMillis": "1704379554283",
"lastLoginTimestampMillis": "1706122336311",
"displayName": {
"displayName": "Shane",
"discriminator": "0001"
},
"lastDisplayNameUpdateTimestampMillis": "0",
"gameIdentities": [
{
"gameShardId": "00000000-0000-0000-0000-000000000001",
"pragmaPlayerId": "453a711c-81ea-4f9a-b105-b70a7e0c4547"
}
],
"idProviderAccounts": [
{
"idProviderType": "UNSAFE",
"accountId": "test01",
"providerDisplayName": {
"displayName": "test01",
"discriminator": ""
}
}
]
}
}
}
View social identity data #
As an Operator send AccountRpc.ViewSocialIdentityV1Request
to view one player’s identity data:
{
"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": "shane-dev@pragma.gg",
"emailVerified": false
}
}
}
}
View batches of player and social identity data #
To view a batch of player identity data, 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 data, 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
Server->Account()->GetPlayerIdentities(
TArray<FString>{ pragmaPlayerId1, pragmaPlayerId2 },
UPragmaAccountPartnerService::FGetPlayerIdentitiesDelegate::CreateLambda(
[this](const TPragmaResult<PlayerIdentitiesResponse> Result){
//handle response
}));
Server->Account()->GetPlayerIdentities(
TArray<FString>{ pragmaPlayerId1, pragmaPlayerId2 }
);
Social identities
Server->Account()->GetSocialIdentities(
TArray<FString>{ pragmaPlayerId1, pragmaPlayerId2 },
UPragmaAccountPartnerService::FGetSocialIdentitiesDelegate::CreateLambda(
[this](const TPragmaResult<SocialIdentitiesResponse> Result){
//handle response
}));
Server->Account()->GetSocialIdentities(
TArray<FString>{ pragmaPlayerId1, pragmaPlayerId2 }
);
Player identities
server.Account.GetPlayerIdentities(
new List<PragmaId> {pragmaPlayerId1, pragmaPlayerId2}
);
Social identities
server.Account.GetSocialIdentities(
new List<PragmaId> {pragmaSocialId1, pragmaSocialId2}
);