Mailboxes

Create mailbox OAuth link

Returns a Google or Outlook OAuth URL for connecting a mailbox. After the user authorizes, they are redirected to redirectUrl. redirectUrl must be pre-allowlisted — contact Salesforge support to add your URL. For Google, set oauthApp to "gmail_api" to authorize through the Google-verified app; omitted, the legacy app is used.

post/workspaces/{workspaceID}/mailboxes/oauth-link

Request

  • Base URL
    https://api.salesforge.ai/public/v2
  • Auth
    API key in header Authorization

Path parameters

workspaceIDstring required

Workspace ID

Request body

emailstring

Email address to pre-select on the provider consent screen.

oauthApp'legacy' | 'gmail_api'

Google OAuth app to authorize through; Google only, defaults to "legacy". "gmail_api" is the Google-verified app with narrower Gmail scopes. Mailboxes connected through it are not added to Warmforge automatically; connect them in Warmforge directly.

provider'google' | 'outlook' required

Mail provider to connect: "google" or "outlook".

redirectUrlstring required

HTTPS URL the user is redirected to after OAuth authorization. Must be pre-allowlisted — contact Salesforge support to add your URL.

Example request

{
  "email": "user@example.com",
  "oauthApp": "gmail_api",
  "provider": "google",
  "redirectUrl": "https://partner.example/oauth/callback"
}

Response

OAuth authorization URL

urlstring

Example response

{
  "url": "https://accounts.google.com/o/oauth2/auth?..."
}

Changes

No recorded changes to this operation across all 1 revision of this API.