POST /scores
Retrieves data from the game leaderboard, providing you with information on player rankings and scores. It helps you monitor and display competitive standings within the game.

Header Parameters

X-Service-Method string required header

Request Body required

application/json
gameId string REQUIRED
limit integer
skip integer

Responses

200 Successful response
application/json
success boolean
leaderboard object[]
Array of:
_id string
nonce string
gameId string
normalizedAddress string
score integer
updatedAt integer (int64)
username string
avatar string
curl -X POST 'https://api.basement.fun/scores' \
  -H 'X-Service-Method: getGameScoresLeaderboard' \
  -H 'Content-Type: application/json' \
  -d '{
  "gameId": "string",
  "limit": 50,
  "skip": 0
}'
const response = await fetch('https://api.basement.fun/scores', {
  method: 'POST',
  headers: {
      "Content-Type": "application/json",
      "X-Service-Method": "getGameScoresLeaderboard"
  },
  body: JSON.stringify({
    "gameId": "string",
    "limit": 50,
    "skip": 0
  })
});

const data = await response.json();
console.log(data);
import requests

headers = {
    'X-Service-Method': 'getGameScoresLeaderboard'
}

response = requests.post('https://api.basement.fun/scores', headers=headers, json={
  "gameId": "string",
  "limit": 50,
  "skip": 0
})
print(response.json())
200 Response
{
  "success": true,
  "leaderboard": [
    {
      "_id": "<string>",
      "nonce": "<string>",
      "gameId": "<string>",
      "normalizedAddress": "<string>",
      "score": 123,
      "updatedAt": 123,
      "username": "<string>",
      "avatar": "<string>"
    }
  ]
}
POST /scores
Ask a question... ⌘I