Account Data #

Account data represents any data that cannot be scoped lower than the account itself. Most data is stored under a Social ID or Player ID, but sensitive or personal data (if stored at all) is represented at the account level.

We recommend against storing this kind of data whenever possible. Third-party payment processors can manage pay information, and authentication credentials can be managed by identity providers.

Quick Guides #

Viewing 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
)

Viewing 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
      }
    }
  }
}