🔌 REST-API v1
Stempeluhr-Anbindung für externe Anwendungen – z.B. FiveM-Server, eigene Bots oder Scripts
Über die öffentliche REST-API können externe Anwendungen Discord-User ein- und ausstempeln, ihren Stempel-Status abfragen und Heartbeats senden. Alle Requests laufen über die Basis-URL:
https://shiftwatch.de/api/v1
🔑 Authentifizierung
Jeder Request benötigt einen server-gebundenen API-Key. Server-Admins erstellen Keys im Admin-Dashboard → Einstellungen → API-Keys (max. 5 aktive Keys pro Server).
⚠️ Wichtig: Der vollständige Key wird nur einmal bei der Erstellung angezeigt. Bewahre ihn sicher auf (Server-Konfiguration, nie im Client-Code). Falls ein Key kompromittiert wird: im Dashboard widerrufen – der Zugriff endet sofort.
Der Key wird in einem von zwei Headern mitgeschickt:
Authorization: Bearer sk_<64 hex chars>
X-API-Key: sk_<64 hex chars>
Der Key bestimmt, für welchen Discord-Server der Request gilt – es gibt keinen Guild-Parameter.
📡 Endpunkte
Stempelt einen User ein. Der User muss Mitglied des Discord-Servers sein.
Beispiel-Request
curl -X POST https://shiftwatch.de/api/v1/clock-in \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"user_id": "123456789012345678"}'
Antwort 200
{
"success": true,
"user_id": "123456789012345678",
"guild_id": "987654321098765432",
"source": "api",
"entry": {
"id": 42,
"clock_in": 1751882400,
"clock_in_iso": "2026-07-07T10:00:00.000Z"
}
}
Die Nebeneffekte sind identisch zum Einstempeln per Discord-Button: On-Duty-Rolle wird vergeben, ein Log-Embed erscheint im konfigurierten Log-Channel (Quelle: „via API"), die Rangliste aktualisiert sich und offene Dashboards erhalten ein Live-Update.
Stempelt einen User aus.
Beispiel-Request
curl -X POST https://shiftwatch.de/api/v1/clock-out \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"user_id": "123456789012345678"}'
Antwort 200
{
"success": true,
"user_id": "123456789012345678",
"guild_id": "987654321098765432",
"source": "api",
"entry": {
"id": 42,
"clock_in": 1751882400,
"clock_out": 1751911200,
"clock_in_iso": "2026-07-07T10:00:00.000Z",
"clock_out_iso": "2026-07-07T18:00:00.000Z",
"duration_minutes": 480
}
}
Setzt den Auto-Clockout-Timer für bis zu 100 User in einem Request zurück – das API-Äquivalent zum „Ich bin noch da"-Button in Discord. Regelmäßig senden (z.B. alle 5 Minuten) für alle Spieler, die gerade auf dem Game-Server online sind. Nicht eingestempelte User werden ohne Fehler mit clocked_in: false zurückgemeldet – so lässt sich der lokale Zustand synchron halten.
Hat ein User bereits eine Auto-Clockout-Warnung in Discord erhalten (z.B. gerade erst wieder ins Spiel gekommen), räumt der Heartbeat die Warnung auf und löscht die Warn-Nachricht – der User wird nicht automatisch ausgestempelt.
Beispiel-Request
curl -X POST https://shiftwatch.de/api/v1/heartbeat \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"user_ids": ["123456789012345678", "234567890123456789"]}'
Antwort 200
{
"success": true,
"guild_id": "987654321098765432",
"results": [
{ "user_id": "123456789012345678", "clocked_in": true },
{ "user_id": "234567890123456789", "clocked_in": false }
]
}
Liefert den aktuellen Stempel-Status eines Users. Unbekannte User liefern clocked_in: false.
Beispiel-Request
curl https://shiftwatch.de/api/v1/status/123456789012345678 \
-H "Authorization: Bearer sk_..."
Antwort 200
{
"user_id": "123456789012345678",
"guild_id": "987654321098765432",
"clocked_in": true,
"session": {
"id": 42,
"clock_in": 1751882400,
"clock_in_iso": "2026-07-07T10:00:00.000Z",
"duration_minutes": 125
}
}
⚠️ Fehler
Alle Fehler haben die Form { "error": "<code>", "message": "<Beschreibung>" }.
| Status | Code | Bedeutung |
|---|---|---|
| 400 | invalid_request | Fehlende/ungültige user_id / user_ids (Discord-IDs, 17–20 Ziffern; Heartbeat: 1–100 pro Request) |
| 401 | missing_api_key | Kein API-Key-Header gesendet |
| 401 | invalid_api_key | Key unbekannt, fehlerhaft oder widerrufen |
| 404 | user_not_in_guild | Der User ist kein Mitglied des Servers |
| 409 | already_clocked_in | Einstempeln abgelehnt; die Antwort enthält current_session |
| 409 | not_clocked_in | Ausstempeln abgelehnt; der User hat keine offene Sitzung |
| 429 | rate_limited | Rate-Limit überschritten, später erneut versuchen |
| 503 | guild_unavailable | Der Bot ist nicht auf dem Server oder noch nicht bereit |
🚦 Rate-Limits
- 60 Requests/Minute pro API-Key
- 120 Requests/Minute pro IP (wird vor der Authentifizierung gezählt)
Standard-RateLimit-*-Header sind in den Antworten enthalten.
💓 Auto-Clockout & Heartbeats – so greifen sie ineinander
Der Bot hat einen eingebauten Auto-Clockout: Nach einer konfigurierbaren Zeit ohne Aktivität erhält der User eine Warnung in Discord und wird automatisch ausgestempelt, wenn er nicht rechtzeitig reagiert. Ohne Gegenmaßnahme müsste ein per API eingestempelter Spieler diese Warnung alle paar Stunden in Discord bestätigen – mitten im Spiel. Der Heartbeat-Endpunkt löst das. Empfohlenes Integrationsmuster:
- Clock-in beim Dienstantritt des Spielers (
POST /clock-in). - Heartbeat-Loop: Alle ~5 Minuten ein
POST /heartbeatmit den Discord-IDs aller eingestempelten Spieler, die gerade online sind. Solange Heartbeats ankommen, wird der Timer zurückgesetzt und es gibt nie eine Discord-Warnung. - Clock-out beim Disconnect und beim Shutdown: Den Disconnect-Event der Plattform abfangen (FiveM:
playerDropped) undPOST /clock-outaufrufen. Saubere Sitzungen enden so sofort, wenn der Spieler geht. Beim Neustart des Game-Servers läuft der Disconnect-Event oft nicht mehr oder der Request kommt nicht mehr raus. Dafür gibt es eigene Hooks: Robloxgame:BindToClose, MinecraftonDisable(), FiveM mit txAdmintxAdmin:events:serverShuttingDown. Schlägt ein Request mit 429, 5xx oder einem Netzwerkfehler fehl, nach ein paar Sekunden erneut senden. Die Beispiele unten machen beides. - Absicherung bei Crashes: Stürzt der Game-Server ab oder läuft der Disconnect-Handler nie, bleiben die Heartbeats einfach aus. Nach der konfigurierten Inaktivitätszeit greift der normale Discord-Ablauf: Warnung (auf die der User noch reagieren kann), sonst Auto-Clockout. Keine Sitzung läuft ewig. Die Zeit bis zur Warnung wird allerdings mitgezählt. Das ist ein Sicherheitsnetz und kein Ersatz für einen sauberen Clock-out.
Das Heartbeat-Intervall deutlich unter der konfigurierten Warnzeit des Servers wählen (5 Minuten reichen völlig) und alle Spieler in einen Request packen – mit 100 Usern pro Aufruf bleibt man weit unter dem Rate-Limit.
🎮 Integrationsbeispiele
Das Muster ist auf jeder Plattform gleich: Discord-ID des Users ermitteln, an den passenden Stellen Clock-in/Clock-out aufrufen und Heartbeats senden, solange der User aktiv ist. Die folgenden Beispiele sind fertige Startpunkte für die gängigsten Anwendungsfälle:
FiveM liefert die Discord-ID jedes Spielers über den discord:-Identifier. Vollständige serverseitige Integration mit Ein-/Ausstempel-Commands, Heartbeat-Loop und Disconnect-Handling:
Den API-Key per set stempeluhr_api_key "sk_..." in der server.cfg hinterlegen – niemals in Client-Code!
local API_BASE = "https://shiftwatch.de/api/v1"
local API_KEY = GetConvar("stempeluhr_api_key", "")
local function getDiscordId(src)
for _, id in ipairs(GetPlayerIdentifiers(src)) do
if id:sub(1, 8) == "discord:" then
return id:sub(9)
end
end
end
-- POST with up to 3 attempts on network errors (status 0), 429 and 5xx.
-- cb(status, body) runs once with the final result.
local function apiPost(path, payload, cb, attempt)
attempt = attempt or 1
PerformHttpRequest(API_BASE .. path, function(status, body)
if (status == 0 or status == 429 or status >= 500) and attempt < 3 then
SetTimeout(attempt * 2000, function()
apiPost(path, payload, cb, attempt + 1)
end)
return
end
-- 409 = already clocked in / not clocked in, harmless
if status ~= 200 and status ~= 409 then
print(("[Shiftwatch] %s failed: %s"):format(path, status))
end
if cb then cb(status, status == 200 and body and json.decode(body) or nil) end
end, "POST", json.encode(payload), {
["Content-Type"] = "application/json",
["Authorization"] = "Bearer " .. API_KEY
})
end
-- Discord ID -> true for every clocked-in player
local clockedIn = {}
local function clockOut(discordId)
if clockedIn[discordId] then
clockedIn[discordId] = nil
apiPost("/clock-out", { user_id = discordId })
end
end
RegisterCommand("clockin", function(src)
local discordId = getDiscordId(src)
if not discordId then return end
apiPost("/clock-in", { user_id = discordId }, function(status)
-- 409: already clocked in, e.g. via the Discord button
if status == 200 or status == 409 then
clockedIn[discordId] = true
-- TODO: notify the player in-game
end
end)
end, false)
RegisterCommand("clockout", function(src)
local discordId = getDiscordId(src)
if not discordId then return end
apiPost("/clock-out", { user_id = discordId }, function(status)
if status == 200 or status == 409 then
clockedIn[discordId] = nil
end
end)
end, false)
-- Disconnect: clock out immediately
AddEventHandler("playerDropped", function()
local discordId = getDiscordId(source)
if discordId then
clockOut(discordId)
end
end)
-- Restart/stop via txAdmin: the process is killed after eventData.delay
-- milliseconds, so clock everyone out right away
AddEventHandler("txAdmin:events:serverShuttingDown", function()
for discordId in pairs(clockedIn) do
clockOut(discordId)
end
end)
-- Heartbeat loop: right away, then every 5 minutes for all online players
-- with a Discord ID (max. 100 per request). Prevents the auto-clockout
-- warning in Discord while playing and syncs clockedIn with the API,
-- e.g. after a resource restart or a clock-out in the dashboard.
CreateThread(function()
while true do
local ids = {}
for _, src in ipairs(GetPlayers()) do
local discordId = getDiscordId(src)
if discordId then
ids[#ids + 1] = discordId
end
end
for i = 1, #ids, 100 do
local batch = { table.unpack(ids, i, math.min(i + 99, #ids)) }
apiPost("/heartbeat", { user_ids = batch }, function(status, body)
if status == 200 and body then
for _, r in ipairs(body.results) do
clockedIn[r.user_id] = r.clocked_in or nil
end
end
end)
end
Wait(5 * 60 * 1000)
end
end)
Roblox kennt keine Discord-IDs – die Zuordnung läuft über ein Verknüpfungssystem wie Bloxlink, mit dem sich Spieler einmalig verknüpfen (in den meisten Roblox-Discord-Communities ohnehin Standard). Das Server-Script löst die Discord-ID über die Bloxlink-API auf und stempelt beim Betreten und Verlassen des Spiels:
Voraussetzungen: HttpService aktivieren (Game Settings → Security → „Allow HTTP Requests") und beide Keys nur in Server-Scripts verwenden (ServerScriptService), nie in LocalScripts oder ReplicatedStorage. DISCORD_GUILD_ID durch die ID des eigenen Discord-Servers ersetzen, für den auch der Bloxlink-Key erstellt wurde (in Discord den Entwicklermodus aktivieren, dann Rechtsklick auf den Server → „Server-ID kopieren").
-- Server script (ServerScriptService)
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local API_BASE = "https://shiftwatch.de/api/v1"
local API_KEY = "sk_..." -- e.g. from a private server module
local BLOXLINK_KEY = "..." -- Bloxlink server key (Developer API)
-- Replace with your own Discord server ID (the server your Bloxlink key
-- was created for). Only used for the Bloxlink lookup, Shiftwatch itself
-- takes the server from the API key.
local DISCORD_GUILD_ID = "YOUR_GUILD_ID"
-- Resolve the Discord ID of a linked player via the Bloxlink API
local discordIdCache = {}
local function getDiscordId(player)
if discordIdCache[player.UserId] ~= nil then
return discordIdCache[player.UserId]
end
local ok, res = pcall(function()
return HttpService:RequestAsync({
Url = "https://api.blox.link/v4/public/guilds/" .. DISCORD_GUILD_ID
.. "/roblox-to-discord/" .. player.UserId,
Method = "GET",
Headers = { Authorization = BLOXLINK_KEY }
})
end)
local discordId
if ok and res.Success then
local data = HttpService:JSONDecode(res.Body)
discordId = data.discordIDs and data.discordIDs[1] or nil
end
discordIdCache[player.UserId] = discordId
return discordId
end
-- POST with up to 3 attempts on network errors, 429 and 5xx.
-- Returns status code and raw body (status nil = no response).
local function apiPost(path, payload)
local status, body
for attempt = 1, 3 do
local ok, res = pcall(function()
return HttpService:RequestAsync({
Url = API_BASE .. path,
Method = "POST",
Headers = {
["Content-Type"] = "application/json",
["Authorization"] = "Bearer " .. API_KEY
},
Body = HttpService:JSONEncode(payload)
})
end)
status = ok and res.StatusCode or nil
body = ok and res.Body or nil
if status and status ~= 429 and status < 500 then
break
end
if attempt < 3 then
task.wait(attempt * 2)
end
end
-- 409 = already clocked in / not clocked in, harmless
if status ~= 200 and status ~= 409 then
warn("[Shiftwatch] " .. path .. " failed: " .. tostring(status) .. " " .. tostring(body))
end
return status, body
end
-- Discord ID -> true for every clocked-in player
local clockedIn = {}
local pendingClockOuts = 0
local function clockOut(discordId)
if not clockedIn[discordId] then return end
clockedIn[discordId] = nil
pendingClockOuts += 1
apiPost("/clock-out", { user_id = discordId })
pendingClockOuts -= 1
end
-- Clock in on join, clock out on leave
Players.PlayerAdded:Connect(function(player)
local discordId = getDiscordId(player)
if not discordId then return end
local status = apiPost("/clock-in", { user_id = discordId })
if status == 200 or status == 409 then
clockedIn[discordId] = true
-- Player left while the requests were still running
if not player.Parent then
clockOut(discordId)
end
end
end)
Players.PlayerRemoving:Connect(function(player)
local discordId = discordIdCache[player.UserId]
if discordId then
clockOut(discordId)
end
end)
-- Server shutdown (last player left, update, "Shut Down All Servers"):
-- without this, Roblox closes the server before the clock-outs are sent.
-- BindToClose gets at most 30 seconds.
game:BindToClose(function()
for _, player in ipairs(Players:GetPlayers()) do
local discordId = discordIdCache[player.UserId]
if discordId then
task.spawn(clockOut, discordId)
end
end
local deadline = os.clock() + 25
while pendingClockOuts > 0 and os.clock() < deadline do
task.wait(0.5)
end
end)
-- Heartbeat loop: every 5 minutes for all clocked-in online players
task.spawn(function()
while true do
task.wait(300)
local ids = {}
for _, player in ipairs(Players:GetPlayers()) do
local discordId = discordIdCache[player.UserId]
if discordId and clockedIn[discordId] then
table.insert(ids, discordId)
end
end
if #ids > 0 then
local status, body = apiPost("/heartbeat", { user_ids = ids })
if status == 200 then
-- Sync local state (e.g. an admin clocked the
-- player out in the dashboard -> clocked_in: false)
for _, r in ipairs(HttpService:JSONDecode(body).results) do
if not r.clocked_in then
clockedIn[r.user_id] = nil
end
end
end
end
end
end)
Auf Minecraft-Servern (Paper/Spigot) liefert DiscordSRV die Verknüpfung zwischen Minecraft-Account und Discord-ID – Spieler verknüpfen sich einmalig per /discord link. Ein kleines Plugin stempelt dann beim Join und Quit:
Den API-Key in der config.yml des Plugins ablegen – nie im Code hardcoden oder ins Repository committen.
// Paper/Spigot plugin, DiscordSRV as the account link source.
// In your JavaPlugin:
// onEnable(): hook = new StempeluhrHook(getLogger(), getConfig().getString("api-key"));
// getServer().getPluginManager().registerEvents(hook, this);
// onDisable(): hook.shutdown();
public final class StempeluhrHook implements Listener {
private static final String API_BASE = "https://shiftwatch.de/api/v1";
private final String apiKey;
private final Logger logger;
private final HttpClient http = HttpClient.newHttpClient();
// One worker thread for all API calls: keeps clock-in and clock-out
// of a player in order and network I/O off the main thread
private final ScheduledExecutorService worker =
Executors.newSingleThreadScheduledExecutor();
// Player UUID -> Discord ID of every linked online player (worker thread only)
private final Map<UUID, String> linked = new HashMap<>();
public StempeluhrHook(Logger logger, String apiKey) {
this.logger = logger;
this.apiKey = apiKey;
worker.scheduleAtFixedRate(this::heartbeat, 1, 5, TimeUnit.MINUTES);
}
// POST with up to 3 attempts on network errors, 429 and 5xx
private void post(String path, String json) {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(API_BASE + path))
.timeout(Duration.ofSeconds(10))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
String result = "no response";
try {
for (int attempt = 1; attempt <= 3; attempt++) {
try {
HttpResponse<String> res =
http.send(request, HttpResponse.BodyHandlers.ofString());
// 409 = already clocked in / not clocked in, harmless
if (res.statusCode() == 200 || res.statusCode() == 409) return;
result = res.statusCode() + " " + res.body();
if (res.statusCode() != 429 && res.statusCode() < 500) break;
} catch (IOException e) {
result = e.toString();
}
if (attempt < 3) Thread.sleep(attempt * 2000L);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
logger.warning(path + " failed: " + result);
}
private static String userJson(String discordId) {
return "{\"user_id\": \"" + discordId + "\"}";
}
@EventHandler
public void onJoin(PlayerJoinEvent event) {
UUID uuid = event.getPlayer().getUniqueId();
worker.execute(() -> {
String discordId = DiscordSRV.getPlugin().getAccountLinkManager()
.getDiscordId(uuid);
if (discordId != null) {
linked.put(uuid, discordId);
post("/clock-in", userJson(discordId));
}
});
}
@EventHandler
public void onQuit(PlayerQuitEvent event) {
UUID uuid = event.getPlayer().getUniqueId();
worker.execute(() -> {
String discordId = linked.remove(uuid);
if (discordId != null) {
post("/clock-out", userJson(discordId));
}
});
}
// Heartbeat for all linked online players, max. 100 IDs per request
private void heartbeat() {
List<String> ids = new ArrayList<>(linked.values());
for (int i = 0; i < ids.size(); i += 100) {
List<String> batch = ids.subList(i, Math.min(i + 100, ids.size()));
post("/heartbeat", "{\"user_ids\": [\"" + String.join("\", \"", batch) + "\"]}");
}
}
// On /stop the plugin is disabled before players are kicked, so onQuit
// no longer runs for them. Clock everyone out here (waits max. 20 s).
public void shutdown() {
worker.execute(() -> {
for (String discordId : linked.values()) {
post("/clock-out", userJson(discordId));
}
linked.clear();
});
worker.shutdown();
try {
worker.awaitTermination(20, TimeUnit.SECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
Die API lässt sich auch aus einem eigenen Discord-Bot nutzen – zum Beispiel für Voice-Dienstzeit: Wer den „Im Dienst"-Voice-Channel betritt, wird eingestempelt, wer ihn verlässt, wird ausgestempelt. Die Discord-IDs hat der Bot direkt zur Hand:
const { Client, GatewayIntentBits } = require('discord.js');
const API_BASE = 'https://shiftwatch.de/api/v1';
const API_KEY = process.env.STEMPELUHR_API_KEY;
const DUTY_CHANNEL_ID = '123456789012345678'; // "on duty" voice channel
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
// POST with up to 3 attempts on network errors, 429 and 5xx.
// Never throws: an unhandled rejection would terminate the bot.
async function apiPost(path, payload) {
let status = 0;
let body = null;
for (let attempt = 1; attempt <= 3; attempt++) {
try {
const res = await fetch(API_BASE + path, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify(payload),
signal: AbortSignal.timeout(10000)
});
status = res.status;
body = await res.json().catch(() => null);
} catch {
status = 0;
body = null;
}
if (status !== 0 && status !== 429 && status < 500) break;
if (attempt < 3) await sleep(attempt * 2000);
}
// 409 = already clocked in / not clocked in, harmless
if (status !== 200 && status !== 409) {
console.warn(`[Shiftwatch] ${path} failed: ${status}`, body);
}
return { status, body };
}
// API calls run one after another, so a quick join + leave
// can't overtake each other
let queue = Promise.resolve();
const enqueue = (task) => (queue = queue.then(task));
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates]
});
// Joining the duty channel clocks in, leaving clocks out
client.on('voiceStateUpdate', (oldState, newState) => {
const joined = newState.channelId === DUTY_CHANNEL_ID
&& oldState.channelId !== DUTY_CHANNEL_ID;
const left = oldState.channelId === DUTY_CHANNEL_ID
&& newState.channelId !== DUTY_CHANNEL_ID;
if (joined) enqueue(() => apiPost('/clock-in', { user_id: newState.id }));
if (left) enqueue(() => apiPost('/clock-out', { user_id: newState.id }));
});
// Heartbeat every 5 minutes for everyone in the duty channel
setInterval(async () => {
try {
const channel = await client.channels.fetch(DUTY_CHANNEL_ID);
const ids = [...channel.members.keys()];
if (ids.length > 0) {
await enqueue(() => apiPost('/heartbeat', { user_ids: ids }));
}
} catch (error) {
console.error('[Shiftwatch] Heartbeat failed:', error.message);
}
}, 5 * 60 * 1000);
client.login(process.env.DISCORD_TOKEN);
Für Scripts, Cron-Jobs, eigene Tools oder ein Kiosk-Terminal reicht ein minimaler Python-Client:
import os
import time
import requests
API_BASE = "https://shiftwatch.de/api/v1"
session = requests.Session()
session.headers.update({
"Authorization": "Bearer " + os.environ["STEMPELUHR_API_KEY"]
})
def request(method, path, payload=None):
"""Up to 3 attempts on network errors, 429 and 5xx.
Returns (status, body), status 0 = no response."""
code, body = 0, None
for attempt in range(1, 4):
try:
res = session.request(method, API_BASE + path,
json=payload, timeout=10)
code = res.status_code
try:
body = res.json()
except ValueError:
body = None
except requests.RequestException:
code, body = 0, None
if code and code != 429 and code < 500:
break
if attempt < 3:
time.sleep(attempt * 2)
return code, body
def clock_in(user_id):
return request("POST", "/clock-in", {"user_id": user_id})
def clock_out(user_id):
return request("POST", "/clock-out", {"user_id": user_id})
def heartbeat(user_ids):
return request("POST", "/heartbeat", {"user_ids": user_ids})
def status(user_id):
return request("GET", "/status/" + user_id)
# Example: clock a user in and show the running session.
# Every call returns (status, body), e.g. (200, {...}) or
# (409, {"error": "already_clocked_in", ...})
print(clock_in("123456789012345678"))
print(status("123456789012345678"))
Grundsätzlich funktioniert jede Umgebung, die HTTP-Requests senden kann – z.B. auch Garry's Mod, Rust, alt:V, RAGE:MP, eigene Intranet-Tools oder Automatisierungen wie n8n. Einzige Voraussetzung: Du kannst den User einer Discord-ID zuordnen. Fehlt dir ein Beispiel für deine Plattform? Melde dich auf dem Support-Server.