Check
Use the Discord API key from the dashboard, not the TopFive resource key.
Endpoint
https://topfive.gg/api/vote.php?action=check&key=SERVER_KEY&discordid=DISCORD_ID
Check a Discord ID against a server key. Use it from a FiveM resource, a Discord bot, or a website.
Use the Discord API key from the dashboard, not the TopFive resource key.
https://topfive.gg/api/vote.php?action=check&key=SERVER_KEY&discordid=DISCORD_ID
Same check, then marks that vote used so the reward cannot be given twice.
https://topfive.gg/api/vote.php?action=claim&key=SERVER_KEY&discordid=DISCORD_ID
{
"ok": true,
"voted": true,
"discord_id": "832767288129749032",
"username": "Brett",
"last_vote": "2026-10-10 18:04:00",
"last_vote_unix": 1760126640,
"hours_ago": 1.2,
"can_vote_again_at": "2026-10-11 18:04:00",
"vote_id": 69,
"already_claimed": false,
"reason": "ok"
}
ok, no_vote, older_than_24h, or already_claimed.Call this from the server, never the client.
set topfive_key "YOUR_DISCORD_API_KEY"
Use set, not setr, so the key is not sent to clients.
local key = GetConvar('topfive_key', '')
local discord = nil
for _, id in ipairs(GetPlayerIdentifiers(src)) do
discord = id:match('^discord:(%d+)$') or discord
end
PerformHttpRequest(('https://topfive.gg/api/vote.php?action=claim&key=%s&discordid=%s'):format(key, discord), function(status, body)
local data = json.decode(body or '')
if data and data.voted then
-- give the reward
end
end, 'GET')