Connect

Get Salesforce OAuth connect URL

Changed on

Initiates OAuth (authorization code with PKCE) for a Salesforce org. Salesforce is a connect-only CRM platform: inbox contacts are matched to Contacts and Leads, and each day of conversation is logged as a Task.

The org must have the Zernio Salesforce package installed first: it carries the app Salesforce authorizes. Production orgs install it from https://login.salesforce.com/packaging/installPackage.apexp?p0=04tfj000000llzZAAQ, sandboxes from the same path on test.salesforce.com. Without it the redirect carries error=salesforce_package_not_installed.

One Salesforce org can be connected per profile. Connecting a different org to a profile that already has one redirects with error=salesforce_profile_has_org.

Flow

  1. Redirect the user to authUrl.
  2. After authorization, Salesforce returns the browser to Zernio's internal callback.
  3. Zernio redirects to redirect_url (or the dashboard when omitted).

On success the redirect carries connected=salesforce, profileId, accountId and username. On failure it carries error, platform=salesforce and error_message.

Reconnecting the same org and profile updates the stored connection in place and keeps its settings.

Requested scopes: api, refresh_token, id.

get/v1/connect/salesforce

Request

  • Base URL
    https://zernio.com/api
  • Auth
    • HTTP bearer
    • or API key in header X-Connect-Token

Query parameters

profileIdstring required

Your Zernio profile ID (get from /v1/profiles).

environment'production' | 'sandbox'

Sign in at login.salesforce.com (production, also Developer Edition orgs) or test.salesforce.com (sandbox).

redirect_urlstring

Custom redirect after connection. Must be an absolute http(s) URL or custom app scheme such as myapp://callback; relative and unsafe URLs return 400.

Response

OAuth authorization URL and authenticated state

authUrlstring uri required

Salesforce URL to open in the user agent.

statestring required

Authenticated, expiring OAuth state handled by the callback.

Changes