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 #

As a Player send AccountRpc.GetAccountV1Request to view your player account information:

{
    "requestId": 1,
    "type": "AccountRpc.GetAccountV1Request",
    "payload": { }
}

Below is a sample response with the current player’s account information:

{
    "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 information #

As an Operator send AccountRpc.ViewSocialIdentityV1Request to view one player’s identity information:

{
  "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 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

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}
);