Bot API

An API token connects your Discord bot or plugin to the ASA Server List. Create the token under “My account” at your server. It is shown only once and belongs only in your bot, never in a public channel.

Without a bot

Add a Discord webhook to your server. Every vote then appears in your channel automatically.

Authentication

Authorization: Bearer asl_DEIN_TOKEN

Endpoints

GET /api/v1/serverName, monthly votes and rank
GET /api/v1/votes?limit=50&unclaimed=1Latest votes, optionally only unrewarded ones
GET /api/v1/votes/check?user=NAMEChecks whether someone voted in the last 24 hours. Searches username, Discord and ARK name.
POST /api/v1/votes/ID/claimMarks a vote as rewarded. Works once per vote.

Limit: 120 requests per minute per server.

Example for a Discord bot

const r = await fetch('https://asaserverliste.de/api/v1/votes/check?user=' + encodeURIComponent(name), {
  headers: { Authorization: 'Bearer ' + process.env.ASL_TOKEN },
});
const data = await r.json();
if (data.voted && !data.vote.claimed) {
  // Belohnung geben, dann als erledigt markieren
  await fetch('https://asaserverliste.de/api/v1/votes/' + data.vote.id + '/claim', {
    method: 'POST', headers: { Authorization: 'Bearer ' + process.env.ASL_TOKEN },
  });
}