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.
/discord/linked-roles/callback- Access
- OAuth provider callback
- Client
- Local or server client
Parameters#
| Name | Location | Meaning |
|---|---|---|
code, state | Query | Supplied by Discord. Keep them private. |
Request examples#
curl -fsS 'https://veil.pub/discord/linked-roles/callback'Response#
An HTML page with the return code in a meta element, or Discord's refusal.
Response headers#
| Header | Value | Meaning |
|---|---|---|
Content-Type | text/html | A page for a browser. |
Cache-Control | no-store | Private: 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
| HTTP | Code | Meaning and next step |
|---|---|---|
| 400 | invalid_parameter | A parameter is missing or malformed. Send n as the card's number, or returnCode as the 32 hex characters the page got. |
| 404 | linked_roles_off | This server does not offer Discord linked roles. Ask the server's operator, or check GET /v1/discord/linked-roles. |
| 404 | not_found | No such card or connection, or the connection is over. Start again from /discord/linked-roles. |
| 409 | callback_used | This connection already came back from Discord once. Start again. |
| 410 | session_expired | The connection took more than 10 minutes. Start again. |
Shared request errors
| HTTP | Code | Meaning and next step |
|---|---|---|
| 429 | rate_limited | An anonymous, signed-request or API-key allowance was exceeded. Wait at least |
| 500 | internal_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. |
| 503 | busy | The application has reached a temporary concurrency or database limit. Wait |