Skip to main content
GET
/
api
/
email
/
oauth
/
authorize
Initiate email OAuth authorization flow
curl --request GET \
  --url https://your-instance.example.com/api/email/oauth/authorize \
  --header 'Authorization: Bearer <token>'
{
  "authUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...&redirect_uri=https%3A%2F%2Frelay.example%2Fapi%2Femail%2Foauth%2Fcallback&scope=...&state=..."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

provider
enum<string>
default:gmail

Email provider to authorize against. Defaults to gmail.

Available options:
gmail,
outlook

Response

Authorization URL returned

Response from GET /api/email/oauth/authorize.

authUrl
string<uri>
required

Fully-qualified provider-hosted authorization URL. Frontends open this in a new window or top-level navigation; the provider will redirect to /api/email/oauth/callback once the user consents.