Tiquo
API and AuthenticationDOM Package

Setup

Install and initialize the Tiquo DOM Package

Setup

For a working reference, explore the Tiquo Example DOM Package Project and review its source code on GitHub.

Install the DOM Package from npm:

npm install @tiquo/dom-package

Use version 1.6.2 or newer to access the read-only customer.createdAt and customer.firstActiveAt fields.

Getting Your Public Key

Before using the SDK, get your public key from the Tiquo dashboard:

  1. Open your Tiquo dashboard
  2. Go to Settings > Website SDK
  3. Enable Website SDK
  4. Copy your public key, which starts with pk_dom_

You also need to add each website domain where you plan to use the SDK in the same settings page. Requests from unlisted domains are rejected.

DOM Package settings page

Initialize the SDK

import { Tiquo } from '@tiquo/dom-package';

const tiquo = new Tiquo({
  publicKey: 'pk_dom_your_key_here',
});

Tiquo is the main SDK class for new integrations. TiquoAuth remains available as a backwards-compatible alias for older integrations.

Configuration Options

OptionTypeDefaultDescription
publicKeystring(required)Your public key starting with pk_dom_
apiEndpointstringhttps://edge.tiquo.appAPI base URL (override for development)
debugbooleanfalseEnable debug logging to the console
enableTabSyncbooleantrueSync authentication state across browser tabs
analyticsbooleantrueEnable first-party website analytics
accessTokenstring-Pre-set an access token for WebView integration
refreshTokenstring-Pre-set a refresh token for WebView integration
const tiquo = new Tiquo({
  publicKey: 'pk_dom_your_key_here',
  debug: true,
  enableTabSync: true,
});

On this page