Get points leaderboard

Viewers ranked by loyalty points or watch time, with each balance.

GET https://cotlet.dev/api/v1/streamelements/points-leaderboard

read

Returns the leaderboard for your loyalty currency. View is Current (points from watching and chat mini-games), All-Time (points from watch time only) or Watch Time (minutes watched). Pass username to look up one viewer, for example before adjust_points. Needs the Loyalty System.

Parameters

Parameters: get_points_leaderboard
NameTypeDescription
view enum enum current, all_time or watch_time. Default: current.
username string string Only this viewer.
limit integer integer 1 to 100. Default: 25.
cursor string string Next page cursor from the previous call.

Request

cURL
curl https://cotlet.dev/api/v1/streamelements/points-leaderboard \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("streamelements", "get_points_leaderboard")
Node.js
const result = await cotlet.call('streamelements', 'get_points_leaderboard');
CLI
cotlet call streamelements get_points_leaderboard

Example response

JSON

{
  "view": "current",
  "entries": [
    {
      "rank": 1,
      "username": "mika_r",
      "points": 1840,
      "watch_time_minutes": 5120
    },
    {
      "rank": 2,
      "username": "luka_dev",
      "points": 775,
      "watch_time_minutes": 2980
    }
  ],
  "next_cursor": null
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.