WardenCoredocs
APIEndpoints

Discord linking

Link or unlink a player's Discord account to their Steam identity.

Manage the Steam ↔ Discord link the server keeps for a player. Linking powers the "Discord travels with Steam" identity: player, moderation and asset-owner responses return the linked discord_id alongside steam_id (null when the player isn't linked).

POST /v1/players/{ref}/discord

Link a Discord account to a Steam player.

Scope: players:link.

{ref} must be a Steam64 here — you are attaching a Discord id to a Steam identity, so a discord: ref is rejected (400 validation_error).

FieldTypeMeaning
discord_idstring (17–20 digits)The Discord account snowflake to link.
POST /v1/players/76561198000000000/discord
Content-Type: application/json

{ "discord_id": "123456789012345678" }

Returns the subject in its new linked state:

{ "player": { "steam_id": "76561198000000000", "discord_id": "123456789012345678" } }

The Steam player must already exist on the server (have joined at least once). Linking a Steam id that already has a Discord — or a Discord id already linked to a different Steam — is a 409 conflict.

DELETE /v1/players/{ref}/discord

Unlink the player's Discord. No body. {ref} may be a Steam64 or a discord: id.

{ "player": { "steam_id": "76561198000000000", "discord_id": null } }

Idempotency and the ref form

By a Steam64 ref, unlink is idempotent — unlinking an already-unlinked player still returns 200. By a discord: ref it is not: once unlinked, that Discord id no longer resolves to any player, so a repeat returns 404 not_found. For retry-safe unlinks, address the player by Steam64.

Errors

Standard error envelope.

CodeStatusWhen
insufficient_scope403The key lacks players:link.
validation_error400A malformed discord_id, or a discord: ref on the link (POST) route.
not_found404The Steam id has no record on this server (has never joined), or a discord: ref that resolves to no linked player.
conflict409The Steam id is already linked to a Discord, or the Discord id is already linked to another Steam (message in error.message).
server_unavailable503The game server is offline or unreachable.
gateway_timeout504The server did not respond in time.

On this page