veil

Return from Discord's linked roles consent

Where Discord sends the browser back with a code. The page proves nothing by itself: it gives a one-time return code to the browser that started, which signs the complete.

GET/discord/linked-roles/callback
Access
OAuth provider callback
Client
Local or server client

Parameters#

NameLocationMeaning
code, stateQuerySupplied by Discord. Keep them private.

Request examples#

cURL
curl -fsS 'https://veil.pub/discord/linked-roles/callback'

Response#

HTTP 200text/html

An HTML page with the return code in a meta element, or Discord's refusal.

Response headers#

HeaderValueMeaning
Content-Typetext/htmlA page for a browser.
Cache-Controlno-storePrivate: never cached.

Errors#

The OAuth callback renders an HTML return page, including when it fails. The codes below describe the failure shown on that page. Response and error guide

HTTPCodeMeaning and next step
400invalid_parameter

A parameter is missing or malformed.

Send n as the card's number, or returnCode as the 32 hex characters the page got.

404linked_roles_off

This server does not offer Discord linked roles.

Ask the server's operator, or check GET /v1/discord/linked-roles.

404not_found

No such card or connection, or the connection is over.

Start again from /discord/linked-roles.

409callback_used

This connection already came back from Discord once.

Start again.

410session_expired

The connection took more than 10 minutes.

Start again.

HTTPCodeMeaning and next step
429rate_limited

An anonymous, signed-request or API-key allowance was exceeded.

Wait at least Retry-After seconds. Share a queue and retry budget across your workers.

500internal_error

An unexpected server error occurred. Internal details are not returned.

Retry reads with bounded backoff. Check write results before sending a new signed operation.

503busy

The application has reached a temporary concurrency or database limit.

Wait Retry-After seconds and retry with bounded backoff.