Skip to content

Server list · For server owners

Server vote rewards API

What it does

Players can vote for a server on its WardogsHub page once per day. The vote rewards API tells your bot which Discord accounts voted for your server, so you can reward them with a role or a perk. There are two ways to ask:

  • List recent voters: your bot polls every few minutes and gives the role to everyone who voted. Members do nothing.
  • Check one member: a member runs a command such as /claimvote and your bot asks about them.

Get your API key

  1. Sign in at wardogshub.gg with the Discord account that submitted the listing.
  2. Open Your servers.
  3. Click Edit on the approved listing.
  4. In the "Vote rewards API" section, click Generate key.

The key is shown once, so copy it somewhere safe. Regenerating replaces it, and the old key stops working immediately. Keys start with wdh_ followed by 43 URL-safe characters. There is one key per listing, and it identifies your server, so requests never name one.

Listings we added ourselves have no owner account yet and cannot generate a key. If that is yours,contact us to claim it.

List recent voters

GET https://wardogshub.gg/api/v1/votes?since=<time>

Everyone who voted for your server since a given time. Poll it every few minutes with since set to when your last poll started (minus a minute or two of overlap), and give the reward to each Discord ID you find in your server. Send your key the same way as for the check.

curl "https://wardogshub.gg/api/v1/votes?since=2026-10-14T00:00:00Z" \
  -H "Authorization: Bearer wdh_YOUR_KEY"
ParameterMeaning
sinceOptional. ISO 8601 time. Voters whose latest vote is at or after it. Defaults to 24 hours ago; anything older than 30 days is treated as 30 days ago.
limitOptional. Voters per page, 1 to 1000. Defaults to 500.
cursorOptional. The next_cursor from the previous page, to fetch the next one. Keep since the same.

Response

{
  "server": { "id": "3f2a…", "name": "Example Community" },
  "since": "2026-10-14T00:00:00.000Z",
  "voters": [
    {
      "discord_id": "987654321098765432",
      "last_vote_at": "2026-10-14T08:02:51.000Z",
      "total_votes": 15,
      "voted_today": true
    },
    {
      "discord_id": "123456789012345678",
      "last_vote_at": "2026-10-14T12:30:00.000Z",
      "total_votes": 42,
      "voted_today": true
    }
  ],
  "next_cursor": null
}
FieldMeaning
votersOrdered by last_vote_at, oldest first. One entry per Discord account.
last_vote_atTheir most recent vote for your server.
total_votesAll their votes for your server, ever, not only those since the since time.
voted_todaytrue if their latest vote falls in the current UTC day.
next_cursornull when this is the last page. Otherwise pass it as cursor to get the rest.

The list only includes accounts that voted for your server. Voters who are not in your Discord appear too, so look each ID up in your server before acting on it.

Check one member

GET https://wardogshub.gg/api/v1/votes/check?discord_id=<id>

discord_id is a Discord user ID (17 to 20 digits). Send your key in the Authorization header as a bearer token.

curl "https://wardogshub.gg/api/v1/votes/check?discord_id=123456789012345678" \
  -H "Authorization: Bearer wdh_YOUR_KEY"

Response

{
  "server": { "id": "3f2a…", "name": "Example Community" },
  "discord_id": "123456789012345678",
  "voted": true,
  "last_vote_at": "2026-10-14T09:12:00.000Z",
  "resets_at": "2026-10-15T00:00:00.000Z"
}
FieldMeaning
serverThe server your key belongs to: its id and name.
discord_idThe Discord ID you asked about, echoed back.
votedtrue if that Discord account voted for your server during the current UTC day.
last_vote_atTheir most recent vote for your server, ever, as an ISO 8601 time. null if they have never voted.
resets_atThe next 00:00 UTC, when they can vote again.

If a Discord ID has never signed in to WardogsHub, the answer is simply voted: false and last_vote_at: null. We do not reveal whether an account exists.

Errors and rate limit

These apply to both endpoints. Errors are JSON in the form { "error": "message" }. Each key may make 120 checks and 60 list requests per minute, and one IP address 300 requests in all; past that you get a 429 with a Retry-After header in seconds.

StatusMeaning
400A parameter is missing or malformed: discord_id on the check, since, limit or cursor on the list.
401The key is missing, wrong, or has been replaced by a newer one.
429Over the rate limit for this key (120 a minute on the check, 60 on the list) or 300 a minute from one IP address. Wait the number of seconds in the Retry-After header.
503Temporarily unavailable. Try again shortly.

Example code

Node.js (18 or newer)

const res = await fetch(
  `https://wardogshub.gg/api/v1/votes/check?discord_id=${discordId}`,
  { headers: { Authorization: `Bearer ${process.env.WARDOGSHUB_API_KEY}` } },
);

if (res.status === 429) {
  console.log('Rate limited, retry in', res.headers.get('Retry-After'), 'seconds');
} else if (!res.ok) {
  throw new Error((await res.json()).error);
} else {
  const { voted } = await res.json();
  if (voted) { /* give the reward */ }
}

Python

import os
import requests

res = requests.get(
    "https://wardogshub.gg/api/v1/votes/check",
    params={"discord_id": discord_id},
    headers={"Authorization": f"Bearer {os.environ['WARDOGSHUB_API_KEY']}"},
    timeout=10,
)

if res.status_code == 429:
    print("Rate limited, retry in", res.headers.get("Retry-After"), "seconds")
else:
    res.raise_for_status()
    if res.json()["voted"]:
        pass  # give the reward

Make these calls from a server or bot you control, never from a client app or a web page.

Ready-made Discord bot

A small discord.js bot that does the whole flow. Every few minutes it reads the voter list and gives your reward role to new voters who are in your Discord. Members can also run /claimvote to get the role straight away, or the vote link if no vote is found. The role is removed a set number of hours after the vote (24 by default).

The code is open source on GitHub, with setup steps, a Dockerfile and updates. Report problems there as issues. If you would rather not use git, GitHub's Code button has a Download ZIP option.

Wardogs-Hub/vote-bot on GitHub →

Quick start

  1. Create a Discord application and bot, and invite it with the bot and applications.commands scopes and the Manage Roles permission.
  2. Drag the bot's role above the reward role in Server Settings, or Discord will refuse to hand it out.
  3. Get your API key as above.
  4. Run the commands below on any machine that stays on, filling in .env before npm start. You need Node 18 or newer, or use the Dockerfile in the repository.
git clone https://github.com/Wardogs-Hub/vote-bot.git
cd vote-bot
cp .env.example .env   # then fill in .env
npm install
npm start

Rules and fair use

  • One vote per Discord account per server per UTC day. The day rolls over at 00:00 UTC.
  • The vote must come from the same Discord account the member uses in your Discord server.
  • Rewarding votes is fine. Do not require a vote to join or play on your server.
  • Do not pay for votes and do not use alt accounts.
  • Keep your key secret. Never put it in a Discord message, a client app or a public repository.

We may revoke keys or remove listings that break these rules.

Privacy

By voting, a player lets the owner of that server see that their Discord account voted for it, when it last did and how many times in all. Owners see the Discord ID only: not the player's name, email or votes for other servers. See the privacy policy.

FAQ

Why did a member's vote not show?

Usually one of three things. They voted with a different Discord account from the one they use in your server. They voted for a different server. Or they voted before 00:00 UTC and are checking after the day rolled over: voted covers the current UTC day only, so last_vote_at will show the earlier vote but voted will be false.

Is there a webhook?

Not yet. Poll the voter list every few minutes with since set to your last poll; that gives the same result without your bot needing a public URL.

Should I use the check or the list?

The list, if your bot hands out roles automatically: one call every few minutes covers every new voter. The check suits a command such as /claimvote, where a member asks about themselves. The sample bot does both.

I lost my key.

Keys are shown once and we cannot show them again. Go to Your servers, edit the listing and generate a new key. The old one stops working immediately, so update your bot straight away.

Elsewhere