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.
Example: Pragma Account display name default behavior

Below we’ll go through the default flow for Pragma Account display name behavior:

Create or log into a Pragma Account

  1. Player A has an account on Steam with the display name Cerberus.
  2. Player A authenticates with Steam into Pragma Engine. There are two scenarios dependent on if the player has an existing Pragma Account:
    • If the player does not have an existing Pragma Account, a new Pragma Account is created using the Steam display name Cerberus.
    • If the player does have an existing Pragma Account, the Pragma Account display name stays the same even if the player’s Steam display name has changed since their last login. This default behavior can be altered using the Account Plugin.

Get 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": ""
                    }
                }
            ]
        }
    }
}

Retrieve social identity data #

Pragma has multiple endpoints for retrieving social identity data. In the sections below we’ll go through them:

The identities returned will include Identity Provider data. The Player endpoints are affected by the visibleToOtherPlayers config value. See Hide a player’s identity providers information for more information.

View social identities with personal information #

As an Operator send AccountRpc.ViewSocialIdentityV1Request to view a single 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
      }
    }
  }
}

Get social identities #

Players can retrieve the social identities of other players using AccountRpc.GetSocialIdentities and AccountRpc.GetSocialIdentitiesByProviderAccountIds.

Below are examples of getting social identities by social IDs for players and servers:

Player

Player->Account().GetSocialIdentities(
  TArray<FString> { pragmaSocialId1, pragmaSocialId2 },
  UPragmaAccountService::FGetSocialIdentitiesDelegate::CreateLambda(
  [this](const TPragmaResult<TArray<FPragmaPublicSocialIdentity>> Result)
    {
      // handle result
    }
  )
);

Server

Server->Account().GetSocialIdentities(
  TArray<FString> { pragmaSocialId1, pragmaSocialId2 },
  UPragmaAccountPartnerService::FGetSocialIdentitiesPartnerDelegate::CreateLambda(
  [this](const TPragmaResult<SocialIdentitiesResponse> Result)
    {
      // handle result
    }
  )
);

Player

Player.Account.GetSocialIdentities(
  new List<PragmaId> { pragmaSocialId1, pragmaSocialId2 }
)

Server

Server.Account.GetSocialIdentities(
  new List<PragmaId> { pragmaSocialId1, pragmaSocialId2 }
);

Below are examples of getting social identities by provider account IDs for players:

Player

Player->Account().GetSocialIdentitiesByProviderAccountIds(
  TArray<FPragmaProviderAccountId>
  {
    pragmaProviderAccountId1, pragmaProviderAccountId2
  },
  UPragmaAccountService::FGetSocialIdentitiesByProviderAccountIdsDelegate::CreateLambda(
    [this](const TPragmaResult<TArray<FPragmaPublicSocialIdentity>> Result)
    {
      // handle result
    }
  )
);

Player

Player.Account.GetSocialIdentitiesByProviderAccountIds(
  new List<ProviderAccountId> { providerAccountId1, providerAccountId2 }
)

Retrieve player identity data #

Players can retrieve player identities of other players using AccountRpc.GetPlayerIdentities and AccountRpc.GetPlayerIdentitiesByProviderAccountIds.

The identities returned will include Identity Provider data. The Player endpoints are affected by the visibleToOtherPlayers config value. See Hide a player’s identity providers information for more information.

Below are examples of getting player identities by social IDs for players and servers:

Player

Player->Account().GetPlayerIdentities(
  TArray<FString> { pragmaPlayerId1, pragmaPlayerId2 },
  UPragmaAccountService::FGetPlayerIdentitiesDelegate::CreateLambda(
    [this](const TPragmaResult<TArray<FPragmaPlayerIdentity>> Result)
    {
      // handle result
    }
  )
);

Server

Server->Account().GetPlayerIdentities(
  TArray<FString> { pragmaPlayerId1, pragmaPlayerId2 },
  UPragmaAccountPartnerService::FGetPlayerIdentitiesPartnerDelegate::CreateLambda(
    [this](const TPragmaResult<PlayerIdentitiesResponse> Result)
    {
      // handle result
    }
  )
);

Player

Player.Account.GetPlayerIdentities(
    new List<PragmaId> { pragmaPlayerId1, pragmaPlayerId2 }
)

Server

Server.Account.GetPlayerIdentities(
    new List<PragmaId> { pragmaPlayerId1, pragmaPlayerId2 }
)

Below are examples of getting player identities by provider account IDs for players:

Player

Player->Account().GetPlayerIdentitiesByProviderAccountIds(
  TArray<FPragmaProviderAccountId>
  {
    pragmaProviderAccountId1, pragmaProviderAccountId2
  },
  UPragmaAccountService::FGetPlayerIdentitiesByProviderAccountIdsDelegate::CreateLambda(
    [this](const TPragmaResult<TArray<FPragmaPlayerIdentity>> Result)
    {
      // handle result
    }
  )
);

Player

Player.Account.GetPlayerIdentitiesByProviderAccountIds(
    new List<ProviderAccountId> { providerAccountId1, providerAccountId2 }
)