Characters - Get Leaderboard For User Characters

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

POST https://titleId.playfabapi.com/Server/GetLeaderboardForUserCharacters

Request Header

Name Required Type Description
X-SecretKey True

string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
PlayFabId True

string

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

StatisticName True

string

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

Responses

Name Type Description
200 OK

GetLeaderboardForUsersCharactersResult

NOTE: The position of the character in the results is relative to the other characters for that specific user. This mean the values will always be between 0 and one less than the number of characters returned regardless of the size of the actual leaderboard.

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

CharacterLeaderboardEntry
GetLeaderboardForUsersCharactersRequest
GetLeaderboardForUsersCharactersResult

NOTE: The position of the character in the results is relative to the other characters for that specific user. This mean the values will always be between 0 and one less than the number of characters returned regardless of the size of the actual leaderboard.

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code

integer

Numerical HTTP code

error

string

Playfab error code

errorCode

integer

Numerical PlayFab error code

errorDetails

object

Detailed description of individual issues with the request object

errorMessage

string

Description for the PlayFab errorCode

status

string

String HTTP code

CharacterLeaderboardEntry

Name Type Description
CharacterId

string

PlayFab unique identifier of the character that belongs to the user for this leaderboard entry.

CharacterName

string

Title-specific display name of the character for this leaderboard entry.

CharacterType

string

Name of the character class for this entry.

DisplayName

string

Title-specific display name of the user for this leaderboard entry.

PlayFabId

string

PlayFab unique identifier of the user for this leaderboard entry.

Position

number

User's overall position in the leaderboard.

StatValue

number

Specific value of the user's statistic.

GetLeaderboardForUsersCharactersRequest

Name Type Description
PlayFabId

string

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

StatisticName

string

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

GetLeaderboardForUsersCharactersResult

NOTE: The position of the character in the results is relative to the other characters for that specific user. This mean the values will always be between 0 and one less than the number of characters returned regardless of the size of the actual leaderboard.

Name Type Description
Leaderboard

CharacterLeaderboardEntry[]

Ordered list of leaderboard entries.