Connect a Google Mailbox via XOAUTH2

Create a Gmail / Google Workspace campaign using the OAuth refresh-token flow (XOAUTH2).

Invite-only. Contact support to enable access. Returns 403 GOOGLE_OAUTH_NOT_ENABLED if your account is not enrolled.

The partner performs the Google OAuth consent flow and supplies Mailivery with a long-lived google_refresh_token plus an initial google_token. Partners do not need to push fresh access tokens over the lifetime of the campaign. The Google scope must be the full https://mail.google.com/ scope; narrower scopes are not sufficient for IMAP XOAUTH2.

Body Params
string
required

Google OAuth2 access token. May be short-lived — Mailivery refreshes it before every send, read, and connection check.

string
required

Long-lived OAuth2 refresh token issued with the full https://mail.google.com/ scope.

string
required
string
required
string
required
string
string
string
required
boolean
Defaults to false
enum
Defaults to normal
Allowed:
string
Defaults to America/Chicago

If No timezone has passed. Mailivery will user defaultg timezone set on Team level.

enum
Allowed:
string | null
Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json