Documentation

GetPlayerProfile

Retrieves the player's profile

Request Details

This API allows for access to details regarding a user in the PlayFab service, usually for purposes of customer support. Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be taken in how this data is stored and managed. Since this call will always return the relevant information for users who have accessed the title, the recommendation is to not store this data locally.

GetPlayerProfileRequest
Request Properties
PlayFabId String

Unique PlayFab assigned ID of the user on whom the operation will be performed.

ProfileConstraints PlayerProfileViewConstraints

If non-null, this determines which properties of the resulting player profiles to return. For API calls from the client, only the allowed client profile properties for the title may be requested. These allowed properties are configured in the Game Manager "Client Profile Options" tab in the "Settings" section.

POST https://{{TitleID}}.playfabapi.com/Client/GetPlayerProfile
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "PlayFabId": "621EF20237534A44"
}
        

Response Details

GetPlayerProfileResult
Result Properties
PlayerProfile PlayerProfileModel

The profile of the player. This profile is not guaranteed to be up-to-date. For a new player, this profile will not exist.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "PlayerProfile": {
      "TitleId": "TitleName",
      "PlayerId": "10931252888739651331",
      "Created": "0001-01-01T00:00:00Z",
      "LastLogin": "0001-01-01T00:00:00Z",
      "BannedUntil": "9999-12-31T23:59:59.999Z",
      "DisplayName": "PlayerDisplayName",
      "TotalValueToDateInUSD": 0
    }
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
PlayerNotInGame 1033
ProfileDoesNotExist 1298
RequestViewConstraintParamsNotAllowed 1303