ðŸĨ‡Leaderboard Webhooks

Let InHouseQueue send your leaderboard directly to you!

InHouseQueue can send your leaderboard to any Webhook URL you choose after each game. If you have a website or another API integration, you can use this feature to create your own custom leaderboard.

👑 Webhook URL

/premium webook_url (url) (delete)

To receive the webhook we send, you'll need the following:

  1. A Web Server with a Public URL:

    • You need a website or server that is accessible online. This could be a website you own or a cloud server you set up.

  2. Create a POST Endpoint:

    • Set up a specific URL on your server (e.g., https://yourwebsite.com/webhook) that can accept POST requests. This is where InHouseQueue will send the data.

  3. Handle Incoming JSON Data:

    • Configure your endpoint to receive and process the JSON data that InHouseQueue sends after each game. This usually involves writing some code to parse the JSON and use the information as needed.

  4. Check the Webhook-Secret header

    • To ensure InHouseQueue is sending you the webhook, we advise you check Webhook-Secret header. You can compare this header value to the secret we share with you.

  5. Test Your Endpoint:

    • Make sure your endpoint is working correctly by sending test POST requests. You can use tools like Postman to simulate the webhook and verify that your server receives and handles the data properly.

JSON sent by InHouseQueue (No Active seasons)

In most cases, the JSON payload will look like this.

To receive the mmr parameter please ensure your leaderboard order it set to MMR. For more information please visit here

{
  "game": "lol",
  "leaderboard": {
     "is_unique": false,
     "sorted_by": "MMR",
     "leaderboard_channel_id": 1234567890,
     "player_entries": [
        {
          "name": "__snipy__",
          "most_played_role": {"name": "top", "frequency": 999},
          "position": 1,
          "wins": 99,
          "losses": 99,
          "total_games": 198,
          "win_rate_percentage": 50,
          "mmr": 9999
        },
        // other players data
     ]
  }  
}

JSON sent by InHouseQueue (Active Season)

If you have a season running the season object is included in the payload.

To receive the mmr parameter please ensure your leaderboard order it set to MMR. For more information please visit here

{
  "game": "lol",
  "season": {
    "name": "A season name",
    "number": 10
  },
  "leaderboard": {
     "is_unique": false,
     "sorted_by": "MMR",
     "leaderboard_channel_id": 1234567890,
     "player_entries": [
        {
          "name": "__snipy__",
          "most_played_role": {"name": "top", "frequency": 999},
          "position": 1,
          "wins": 99,
          "losses": 99,
          "total_games": 198,
          "win_rate_percentage": 50,
          "mmr": 9999
        },
        // other players data
     ]
  }  
}

Headers & Webhook verification

Here are the basic headers we send.

content-length	492
user-agent	Python/3.11 aiohttp/3.10.5
accept-encoding	gzip, deflate
webhook-secret	<your_secret>
content-type	application/json

For your own security, please verify the webhook-secret header on every request to ensure the data is really from InHouseQueue. You will receive the secret via an ephemeral message (visible only to you) after running /premium webook_url (url) (delete). This is not required but we recommend it.

When your endpoint receives a request, compare the webhook-secret header to the secret value we provided. If they don't match, reject the request.

If your token is ever compromised, simply re-run /premium webook_url (url) (delete) to regenerate a new secret token.

We cannot give you your secret token after the ephemeral message expires. So please keep it safe.

Top-Level Fields

Field

Type

Description

Optional

game

string

The game identifier (e.g., "lol").

No

seasons

object

Information about the current season.

Yes

leaderboard

object

Contains all leaderboard details.

No

season Object


Field Path

Type

Description

season.name

string

The name of the current season (e.g., "A season name").

season.number

integer

The number identifier of the season (e.g., 10).

leaderboard Object


Field

Type

Description

is_unique

boolean

Indicates if the leaderboard is unique. More information here

sorted_by

string

How the leaderboard is sorted. It can be MMR or WINS

leaderboard_channel_id

integer

Discord channel ID for the leaderboard.

player_entries

array of object

List of players in the leaderboard.

player_entries Array Items


Field

Type

Description

name

string

Player's in-game name (e.g., "__snipy__").

most_played_role

object

The player's most played role. OPTIONAL: This object will NOT appear if you are playing "custom" game.

most_played_role.name

string

Name of the role (e.g., "top").

most_played_role.frequency

integer

Number of times the role was played (e.g., 999).

position

integer

Player's position in the leaderboard (e.g., 1). Note: The player in first place with have the position of 0 .

wins

integer

Number of wins the player has (e.g., 99).

losses

integer

Number of losses the player has (e.g., 99).

total_games

integer

Total games played by the player (e.g., 198).

win_rate_percentage

integer

Player's win rate percentage (e.g., 50).

mmr

integer

Player's MMR for this leaderboard. (e.g., 1000) - Note: This is NOT included if your sorted_by is WINS.

Last updated