Documentation

Discord Token

Retrieve a linked Discord OAuth access token for first-party fulfillment.

POST/api/internal/discord-token

Warning
First-party only. Authenticate with Authorization: Bearer <INTERNAL_API_SECRET>. Never expose this secret or endpoint to browsers.

Purpose

Returns the Discord provider access token stored for a Radiant Auth user (for example Store guilds.join role fulfillment). The user must have Discord linked on their account.

Request

FieldDescription
userIdRadiant Auth user id (sub)
authUserIdAlias for userId

Responses

  • 200 — Discord token payload
  • 400userId missing
  • 401 — invalid or missing internal secret
  • 404discord_not_linked
discord-token.json
{
  "accountId": "discord_account_row_id",
  "accessToken": "discord_oauth_access_token",
  "scope": "identify guilds.join",
  "accessTokenExpiresAt": "2026-07-18T14:00:00.000Z"
}

Example

discord-token.sh
curl -X POST "https://auth.rdnt.live/api/internal/discord-token" \
  -H "Authorization: Bearer INTERNAL_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"userId":"AUTH_USER_ID"}'