API reference
API reference
Select your platform
No SDKs available
No versions available

Leaderboards

Updated: Oct 30, 2025

Leaderboards

class Leaderboards
The Leaderboards API provides a way to manage and interact with leaderboards in your application. The API allows you to retrieve information about a single leaderboard, write entries to a leaderboard, and retrieve blocks of leaderboard entries based on different criterias. Leaderboard-integrated apps get Challenges for free, accessible through the Scoreboards UI. Visit our website for more information about leaderboards.

Constructors

NameSummary
Leaderboards
constructor()

Types

NameSummary
Companion
object Companion

Functions

NameSummary
get
fun get(coroutineScope: CoroutineScope, leaderboardName: String): PagedResults<Leaderboard>
Retrieves detailed information for a single leaderboard with a specified name, returning an array of horizon.platform.leaderboards.models.Leaderboard.
getEntries
fun getEntries(coroutineScope: CoroutineScope, leaderboardName: String, limit: Int, filter: LeaderboardFilterType, startAt: LeaderboardStartAt): PagedResults<LeaderboardEntry>
Retrieves a list of leaderboard entries for a specified leaderboardName, with options to filter and limit the number of results returned.
getEntriesAfterRank
fun getEntriesAfterRank(coroutineScope: CoroutineScope, leaderboardName: String, limit: Int, afterRank: Long): PagedResults<LeaderboardEntry>
Retrieves a block of leaderboard entries starting from a specific rank.
getEntriesByIds
fun getEntriesByIds(coroutineScope: CoroutineScope, leaderboardName: String, limit: Int, startAt: LeaderboardStartAt, userIds: List<String>): PagedResults<LeaderboardEntry>
Retrieves a block of leaderboard entries that match the specified user IDs. Only entries corresponding to the provided user IDs will be returned.
writeEntry
suspend fun writeEntry(leaderboardName: String, score: Long, extraData: ByteArray? = null, forceUpdate: Boolean? = null): LeaderboardUpdateStatus
Writes a single entry to the leaderboard, returning horizon.platform.leaderboards.models.LeaderboardUpdateStatus indicating whether the update was successful and providing the updated challenge IDs.
writeEntryWithSupplementaryMetric
suspend fun writeEntryWithSupplementaryMetric(leaderboardName: String, score: Long, supplementaryMetric: Long, extraData: ByteArray? = null, forceUpdate: Boolean? = null): LeaderboardUpdateStatus
Writes a single entry to a leaderboard which can include supplementary metrics, returning horizon.platform.leaderboards.models.LeaderboardUpdateStatus indicating whether the update was successful and providing the updated challenge IDs.

Companion

object Companion