For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • Getting started
    • Introduction
    • IP Whitelisting
    • Obtaining API keys
    • LLMs.txt
    • MCP server
    • Quickstart
    • Native clients
    • Concepts
    • Embedding authentication
    • Multitenancy
    • Versioning
    • Idempotent requests
    • Events
    • Self-hosted option
    • 2025-09-18 Migration Guide
  • Configuring your connections
    • Overview
    • CDC streaming from databases
    • Syncing to custom webhooks
  • Code examples
    • Overview
    • Bulk sync (ELT) from HubSpot to PostgreSQL
    • Bulk sync (ELT) from Salesforce to S3
    • Bulk sync (ELT) from Salesforce to Snowflake
    • Model sync (Reverse ETL) from Snowflake query to Salesforce
    • Model sync (Reverse ETL) from MongoDB to Salesforce
    • Adding users from Snowflake to Salesloft Cadence
    • Adding contacts from Snowflake to Gong Engage
    • Joined model sync from Postgres, Airtable, and Stripe to Hubspot
    • Model sync from MySQL to Snowflake
    • Model sync from Salesforce to Netsuite
    • Querying Salesforce using SOQL
    • Syncing audiences from Snowflake to LinkedIn Ads
    • Syncing contacts from Google Cloud Storage to Salesforce
    • Syncing contacts from Google Cloud Storage to webhooks
    • Transactional calls with LinkedIn Ads audiences
  • Terraform examples
    • Overview
    • Model sync (Reverse ETL) from BigQuery to Salesforce
    • Model sync (Reverse ETL) from BigQuery to LinkedIn Ads
Logo
Log inBook a demo
On this page
  • Modal appearance options
  • Restricting integrations
  • Dark mode
  • Custom logo
  • Connect modal initialization
  • Steps
  • Request parameters
  • Code example
Getting started

Embedding authentication

Was this page helpful?
Previous

Multitenancy

Next

Polytomic Connect handles authentication to your customers’ systems so you do not have to build input forms or OAuth flows yourself. It works with databases, data warehouses, CRMs, cloud buckets, spreadsheets, and arbitrary HTTP APIs.

With a single API call, you can open a Polytomic-generated auth modal for any supported integration. For example, Polytomic Connect generates these modals for HubSpot and Snowflake:

HubSpot

Snowflake


Polytomic supports many other integrations. You can open an auth modal for any of them without knowing which parameters each one requires.

Modal appearance options

Restricting integrations

Use the whitelist parameter to restrict which integrations customers can connect to.

Pass a single-element array to allow only one integration — for example, ["salesforce"] sends the user straight into the Salesforce auth form.

Pass multiple values — for example, ["salesforce", "hubspot"] — to present the user with a picker first, then the auth form for their selection.

Dark mode

Set the dark parameter to true to render the modal in dark theme.

Custom logo

The auth modal can display your company’s logo instead of Polytomic’s. To enable this, email an SVG of your logo to support@polytomic.com. Below are light- and dark-mode examples with a custom logo in the top left and a restricted integration list:

Light mode Dark mode

Connect modal initialization

Steps

1

Obtain an API key

If you do not already have one, see obtaining an API key.

2

Request a connect redirect URL

Call /api/connections/connect with the connection types and any additional parameters. Make this call once per user connection.

3

Open the connect modal

Send the user to the URL returned in the redirectURL field.

Request parameters

NAME
TYPE
DESCRIPTION
REQUIRED
namestringThe name of the connection. Connection names must be unique within an organization.true
redirectURLstringThe URL to redirect to after the connection is authenticated.true
whiteliststring[]A list of connection types to whitelist.false
darkbooleanWhether to use the dark theme.false

Code example

The following example authenticates to PostgreSQL through the Polytomic Connect API. The caller does not need to know which inputs PostgreSQL requires — Polytomic Connect handles that.


Proxy the request through a backend server so your API token stays off the client. The example is split into frontend and backend.

1const REDIRECT_URL = "http://localhost:8080/connect_complete";
2
3async function initiatePolytomicConnect() {
4 const response = await fetch(`/_/api/connections/connect`, {
5 method: "POST",
6 mode: 'cors',
7 cache: 'no-cache',
8 credentials: 'same-origin',
9 body: JSON.stringify({
10 name: "My connection",
11 whitelist: ["salesforce", "hubspot", "marketo", "outreach"],
12 redirect_url: REDIRECT_URL,
13 dark: true,
14 }),
15 });
16 if (response.ok) {
17 const data = await response.json();
18 window.open(data.data.redirect_url, "_blank")
19 return;
20 }
21 const { error } = await response.json();
22 throw new Error(error);
23}