Skip to main content
POST
/
v1
/
session
/
login
/
oauth
/
{provider}
/
authorize
Initiate OAuth authorization
curl --request POST \
  --url https://{appId}.session.prelude.dev/v1/session/login/oauth/{provider}/authorize \
  --header 'Content-Type: application/json' \
  --data '
{
  "redirect_uri": "<string>",
  "code_challenge": "<string>",
  "dispatch_id": "<string>"
}
'
{
  "authorization_url": "<string>"
}

Path Parameters

provider
string
required

The OAuth provider identifier (e.g., "google", "apple")

Example:

"google"

Body

application/json
redirect_uri
string
required

The URI to redirect to after OAuth authorization.

Example:

"https://example.com/callback"

code_challenge
string
required

PKCE code challenge for the OAuth flow.

Example:

"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"

dispatch_id
string

The identifier of the dispatch from the front-end SDK.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

OK

authorization_url
string
required

The URL to redirect the user to for OAuth authorization.

Example:

"https://accounts.google.com/o/oauth2/v2/auth?client_id=...&redirect_uri=...&scope=openid+email&state=..."