Getting started

Arkyc verifies your users’ identities, document capture, liveness, face match and an automated decision behind one API and an embeddable widget. This guide integrates the hosted product in four steps. Prefer to run it yourself? See the self-hosting docs.

1. Create a project and get a key

Create an account, add a project in the dashboard, and mint a secret key (sk_…) under the project’s API keys. The key identifies the project, so keep it on your backend only, the browser never sees it.

2. Install the SDK

pnpm add @arkyc/sdk

3. Create a session (server)

On your backend, create a verification session and return its one-time clientToken to your frontend. The project is inferred from the secret key.

server.ts
import { Arkyc } from '@arkyc/sdk'

const arkyc = new Arkyc({ secretKey: process.env.ARKYC_SECRET_KEY! })

const { session, clientToken } = await arkyc.sessions.create({
  userReference: 'user_456', // your id for this user
})

// Store session.id to reconcile webhooks; send clientToken to the browser.
return { clientToken }

4. Embed the widget (client)

Open the widget with that token, your user completes capture and liveness.

client.ts
import { ArkycWidget } from '@arkyc/sdk/browser'

ArkycWidget.open({
  token: clientToken,
  onComplete: (result) => console.log(result.status),
  onError: (err) => console.error(err),
})

Handle the result

Listen for the decision with a signed webhook (recommended for your source of truth), and optionally react in the browser via onComplete. Next: embed the widget, explore the server SDK, or wire up webhooks.