Skip to main content

Initiate OAuth login flow

POST 

/v1/oauth/login

Initiates OAuth authentication flow for email service providers (Gmail, Outlook, etc.) to configure email sending/receiving capabilities. Can handle both new OAuth flows and token exchange flows.

Conditional rules:

  • type is required when mailer_id is empty; allowed values: smtp_imap, smtp, imap.
  • When type is imap or smtp_imap (and mailer_id is empty), webhook is required.
  • When type is smtp, webhook must be omitted and include_sent, include_spam, include_trash must all be false.
  • When exchange_token is true, token is required and must include a non-empty refresh_token.

Request

Body

required

OAuth login request payload

    app_id stringrequired
    exchange_token boolean
    include_sent boolean
    include_spam boolean
    include_trash boolean
    mailer_id string
    redirect_uri string
    state string
    strict_replies boolean

    token

    object

    access_token string
    expires_in integer
    id_token string
    refresh_token string
    scope string
    token_type string
    type string

    Possible values: [smtp_imap, smtp, imap]

    webhook

    object

    headers object
    method stringrequired

    Possible values: [POST]

    Default value: POST

    url stringrequired

Responses

OAuth login initiated successfully - returns authorization URL

Schema

    success boolean
    url string
Loading...