Documentation

GetCharacterReadOnlyData

Retrieves the title-specific custom data for the character which can only be read by the client

Request Details

Data is stored as JSON key-value pairs. If the Keys parameter is provided, the data object returned will only contain the data specific to the indicated Keys. Otherwise, the full set of custom character data will be returned.

GetCharacterDataRequest
Request Properties
CharacterId (required) String

Unique PlayFab assigned ID for a specific character owned by a user

IfChangedFromDataVersion uint32

The version that currently exists according to the caller. The call will return the data for all of the keys if the version in the system is greater than this.

Keys List<String>

Specific keys to search for in the custom user data.

PlayFabId String

Unique PlayFab identifier of the user to load data for. Optional, defaults to yourself if not set.

POST https://{{TitleID}}.playfabapi.com/Client/GetCharacterReadOnlyData
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "PlayFabId": "2039475",
  "CharacterId": "98342357",
  "Keys": [
    "preferences",
    "progress"
  ]
}
        

Response Details

GetCharacterDataResult
Result Properties
CharacterId String

Unique PlayFab assigned ID for a specific character owned by a user

Data Dict<String, UserDataRecord>

User specific data for this title.

DataVersion (required) uint32

Indicates the current version of the data that has been set. This is incremented with every set call for that type of data (read-only, internal, etc). This version can be provided in Get calls to find updated data.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "CharacterId": "1234436343",
    "Data": {
      "preferences": {
        "Value": "alpha",
        "LastUpdated": "2014-08-20T12:30:45Z",
        "Permission": "Public"
      },
      "progress": {
        "Value": "level_twenty",
        "LastUpdated": "2014-09-01T10:12:30Z",
        "Permission": "Private"
      }
    },
    "DataVersion": 12
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
CharacterNotFound 1135
UserisNotValid 1030