Documentation

GetLeaderboardForUserCharacters

Retrieves a list of all of the user's characters for the given statistic.

Request Details

GetLeaderboardForUsersCharactersRequest
Request Properties
MaxResultsCount (required) int32

Maximum number of entries to retrieve.

PlayFabId (required) String

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

StatisticName (required) String

Unique identifier for the title-specific statistic for the leaderboard.

POST https://{{TitleID}}.playfabapi.com/Server/GetLeaderboardForUserCharacters
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "StatisticName": "Kills",
  "PlayFabId": "10931252888739651331",
  "MaxResultsCount": 20
}
        

Response Details

Note that the Position of the user in the results is for the overall leaderboard.

GetLeaderboardForUsersCharactersResult
Result Properties
Leaderboard List<CharacterLeaderboardEntry>

Ordered list of leaderboard entries.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "Leaderboard": [
      {
        "PlayFabId": "10931252888739651331",
        "CharacterId": "987343220",
        "CharacterName": "FighterDude",
        "DisplayName": "username",
        "CharacterType": "blue_warrior",
        "StatValue": 12,
        "Position": 0
      }
    ]
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code
AccountNotFound 1001