Documentation

GetUserPublisherData

Retrieves the publisher-specific custom data for the user which is readable and writable 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 user data will be returned.

GetUserDataRequest
Request Properties
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>

List of unique keys to load from.

PlayFabId String

Unique PlayFab identifier of the user to load data for. Optional, defaults to yourself if not set. When specified to a PlayFab id of another player, then this will only return public keys for that account.

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

Response Details

GetUserDataResult
Result Properties
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": {
    "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": 0
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
PublisherNotSet 1122