Skip to main content
POST
Start OAuth Sign-in
Start a Connect with … sign-in for a provider whose catalog entry has oauth: true. The response is the provider’s sign-in URL. Send the user’s browser there. After the user approves, the provider returns to your integrations page, and 60db stores the connection. This endpoint is for the 60db app and other browser sign-ins. The sign-in is tied to the browser that started it by a short-lived cookie, so the same browser must open the URL. You need the integration:write permission (owner, admin or developer).

How the sign-in completes

  1. Open the url from the response in the same browser.
  2. The user approves on the provider’s page.
  3. The provider redirects to the Redirect URL (your integrations page, see oauth_redirect_uri in the catalog) with code and state.
  4. That page passes them to GET /agents/integrations/oauth/callback. 60db checks the state against the cookie (single use, 15 minutes), exchanges the code, stores the tokens encrypted, and runs the live test.
  5. The browser lands back on the integrations page with ?integration_oauth=connected&integration=<id>, or ?integration_oauth=error&reason=<reason>, optionally with &detail=<provider OAuth error code>.
60db renews the sign-in automatically before it expires. Tokens and client secrets are never returned.

Request

Headers

string
required
Bearer token, or the 60db app session

Body

string
required
zendesk, google_calendar, google_drive, google_sheets or salesforce
string
Name of the new connection. Defaults to the provider name. A taken name gets a short suffix.
string
An existing connection to reconnect (UUID). Its stored OAuth client is used unless fields gives a new one.
object
Field values from the catalog. Use oauth_client_id and oauth_client_secret for your own OAuth client (required unless the catalog says oauth_default_client: true), subdomain for Zendesk, and optionally spreadsheet_id and sheet (default spreadsheet and tab) for Google Sheets.

Response

200 OK

Callback outcomes

Errors