Install & configure
The JavaScript SDK ships as @drukverify/ekyc-sdk-js — a universal (browser + Node.js) client with zero runtime dependencies (~3.2 KB gzipped core, ~2.9 KB optional camera components). It is distributed as versioned, checksummed release artifacts from the private DrukVerify/ekyc-sdk-js repository; ask your integration contact for access.
Install from a release tarball
Download the release assets (drukverify-ekyc-sdk-<version>.tgz + SHA256SUMS), verify, and install — or import the tarball into your internal artifact repository (Artifactory/Nexus):
shasum -a 256 -c SHA256SUMS
npm install ./drukverify-ekyc-sdk-js-0.3.0.tgz
Or pin the git tag directly:
npm install git+https://github.com/DrukVerify/ekyc-sdk-js#v0.3.0
Configure a client
import { EkycClient } from '@drukverify/ekyc-sdk-js';
const client = new EkycClient({
baseUrl: 'https://api.drukverify.com', // required, no trailing slash
apiKey: credential, // see below
version: '2026-05-12', // Drukverify-Version header (default shown)
timeout: 30_000, // ms
});
Authentication: browser vs server
- Server-side (Node): use your secret key (
dv_sk_…) directly asapiKey. - Browser: never embed a secret key. Your backend exchanges the secret key for a short-lived session token via
POST /v1/sessionsand hands the resultingdv_tok_…to the page:
const { token } = await fetch('/your-backend/session').then(r => r.json());
const client = new EkycClient({ baseUrl: 'https://api.drukverify.com', apiKey: token });
The SDK stores nothing in the browser — no cookies, no localStorage; the token lives in JS memory only.
Supported environments
Node.js 18+ and the last two major versions of Chrome, Edge, Firefox, and Safari (15+). Camera capture requires a secure context (HTTPS).