Skip to main content
GET
/
api
/
email
/
oauth
/
callback
Handle email OAuth callback
curl --request GET \
  --url https://your-instance.example.com/api/email/oauth/callback
{
  "message": "Missing code or state",
  "error": "bad_request"
}

Query Parameters

code
string

Authorization code returned by the provider.

state
string

Base64-encoded JSON { userId, organizationId, provider } echoed back by the provider.

Response

Redirect to ${CLIENT_URL}/settings?provider=<name>&status=success on success, or ${CLIENT_URL}/settings?status=error on failure. Frontends should observe the provider and status query parameters on the resulting settings page to surface the outcome to the user.