Skip to main content
POST
Create mailbox OAuth link

Authorizations

Authorization
string
header
required

Path Parameters

workspaceID
string
required

Workspace ID

Body

application/json

OAuth link request

OAuth link request

provider
enum<string>
required

Mail provider to connect: "google" or "outlook". Mailboxes on any other provider connect with their own credentials through POST /workspaces/{workspaceID}/mailboxes instead.

Available options:
google,
outlook
Example:

"google"

redirectUrl
string
required

Absolute https URL the user returns to once they have authorized the mailbox. It must be registered with Salesforge beforehand — ask support to add it — and may carry a path and query but no fragment or embedded credentials.

Salesforge appends the result to it: mailboxId and address on success, or connection_status=failed and an error code on failure. Query parameters already present are preserved, so state can be round-tripped through this URL.

Example:

"https://partner.example/oauth/callback"

email
string

Address to pre-select on the provider's consent screen. Optional; the user can still choose a different account, so treat the address returned on the redirect as authoritative.

Example:

"user@example.com"

Response

OAuth authorization URL

url
string
Example:

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