Skip to content
Getting started

Quickstart

Three steps from zero to a working verification flow. You will get keys, point at a workflow, and drop the SDK into your app.

1 · Get your API keys

Create a project in the Console and copy your public key. Keys are environment-scoped by prefix — pk_sandbox_… for testing and pk_live_… for production. There is no separate environment switch; the key decides.

Request access to the Console →

2 · Reference a workflow

In the Console, build a workflow — the ordered set of checks (document, liveness, face match, AML) you want to run. Copy its workflowExternalId. You will pass it, your key, and a clientData identifier for the end user when you start a session.

3 · Add the SDK

Install for your platform, configure a session, then start the flow and handle one terminal result.

verify.js
import { OthentoSDK } from '@alialjundi/web-sdk';

const sdk = new OthentoSDK({
  mode: 'create',
  apiKey: 'pk_sandbox_•••',
  workflowExternalId: 'wf_onboarding',
  clientData: 'user-123',
  onCompleted: ({ decision, externalId }) => {
    // 'Approved' | 'Declined' | 'InReview'
    console.log(decision, externalId);
  },
  onError: (err, message) => console.error(err.code, message),
});

sdk.start();

4 · Handle the result

Exactly one terminal callback fires per session, so your handling stays simple:

  • onCompleted — the session reached a decision: Approved, Declined or InReview.
  • onCancelled — the user dismissed the flow before finishing.
  • onError — a non-decision error (network, camera permission, etc.).

Persist the externalId from onSessionCreated so you can correlate the decision your webhook delivers back to the user.

5 · Test in the sandbox

With a pk_sandbox_… key, use the sample documents from your Console to drive the Approved, Declined and InReview paths deterministically. When you are ready, swap to a pk_live_… key — no other change required.