{"revision":"25c04798c52757c2","language":"en","entry":{"id":"discord-roles-callback","kind":"endpoint","group":"manage","title":"Return from Discord's linked roles consent","method":"GET","path":"/discord/linked-roles/callback","paths":[],"summary":"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.","response":"An HTML page with the return code in a meta element, or Discord's refusal.","parameters":[{"name":"code, state","in":"query","required":false,"description":"Supplied by Discord. Keep them private."}],"sample":"/discord/linked-roles/callback","access":"provider-callback","base":"directory","notes":[],"errors":["400 invalid_parameter","404 linked_roles_off","404 not_found","409 callback_used","410 session_expired","429 rate_limited","500 internal_error","503 busy"],"related":["discord-app"],"sections":[{"kind":"code","language":"shell","code":"curl -fsS 'https://veil.pub/discord/linked-roles/callback'"}],"live":false,"responses":[{"status":200,"contentType":"text/html","description":"An HTML page with the return code in a meta element, or Discord's refusal.","fields":[]}],"responseObjects":[],"errorFormat":"html","errorDetails":[{"status":400,"code":"invalid_parameter","description":"A parameter is missing or malformed.","action":"Send n as the card's number, or returnCode as the 32 hex characters the page got.","scope":"endpoint"},{"status":404,"code":"linked_roles_off","description":"This server does not offer Discord linked roles.","action":"Ask the server's operator, or check GET /v1/discord/linked-roles.","scope":"endpoint"},{"status":404,"code":"not_found","description":"No such card or connection, or the connection is over.","action":"Start again from /discord/linked-roles.","scope":"endpoint"},{"status":409,"code":"callback_used","description":"This connection already came back from Discord once.","action":"Start again.","scope":"endpoint"},{"status":410,"code":"session_expired","description":"The connection took more than 10 minutes.","action":"Start again.","scope":"endpoint"},{"status":429,"code":"rate_limited","description":"An anonymous, signed-request or API-key allowance was exceeded.","action":"Wait at least `Retry-After` seconds. Share a queue and retry budget across your workers.","scope":"common"},{"status":500,"code":"internal_error","description":"An unexpected server error occurred. Internal details are not returned.","action":"Retry reads with bounded backoff. Check write results before sending a new signed operation.","scope":"common"},{"status":503,"code":"busy","description":"The application has reached a temporary concurrency or database limit.","action":"Wait `Retry-After` seconds and retry with bounded backoff.","scope":"common"}],"responseHeaders":[{"name":"Content-Type","value":"text/html","description":"A page for a browser."},{"name":"Cache-Control","value":"no-store","description":"Private: never cached."}],"documentationUrl":"https://veil.pub/docs/discord-roles-callback","supportsBrowserFetch":false,"browserMode":"local-or-server"}}