redirectUrl where you want the user to land after they authenticate, and the API returns the provider’s authorization URL along with a state token. You then redirect the user to that URL — the provider handles the rest.
Endpoint
Path Parameters
string
required
The OAuth provider to authenticate with. Must be one of:
discordroblox
Request Body
string
required
The URL your application wants the user redirected to after the provider callback completes. This value must be a registered URL — the API rejects any URL that has not been approved for your application.
Response
A successful200 response returns the following fields:
string
The full authorization URL on the provider’s side (e.g.,
https://discord.com/oauth2/authorize?...). Redirect the user to this URL to begin the consent flow.string
A unique opaque token that ties this authorization request to the subsequent callback. The server stores this value server-side and validates it when the provider redirects back. You do not need to store or forward it manually — the provider appends it automatically during the callback.
Code Example
Example Response
Errors
You must be authenticated (i.e., your request must carry a valid session cookie) before calling this endpoint. Ensure your client passes
credentials: 'include' so any existing session cookies are forwarded with the request.