Skip to main content
Sessions required

Every yes:id SDK module needs a valid session before it can run. Complete the Sessions Guide first, it takes 5 minutes and is required before the code below will work.

Installing the Liveness SDK

@yesid/liveness-sdk is the browser SDK for liveness verification. It ships as a web component (<liveness-check>), a React wrapper (LivenessReact) and a headless API.

Current version in the yes:id web demo: 1.4.6.

Face matching is not a separate web widget. Enable faceMatch on the session; after document capture and liveness both succeed, your backend reads the FACE_MATCH step from session results.

1. Configure the yes:id npm registry​

The @yesid packages are published to a private registry. Add this to your project .npmrc before installing:

.npmrc
registry=https://registry.npmjs.org/
@yesid:registry=https://npm.yesid.tech/
@identityd:registry=https://npm.yesid.tech/
//npm.yesid.tech/:_authToken=${NPM_TOKEN}

Set NPM_TOKEN in your environment. Do not commit a real token.

2. Install the package​

npm install @yesid/liveness-sdk

react is an optional peer dependency. Install it only if you use LivenessReact.

3. Import the SDK​

Only these entry points are public:

ImportUse for
@yesid/liveness-sdkHeadless API (Liveness, createLivenessCheck, camera helpers)
@yesid/liveness-sdk/componentdefineYesIdLiveness() — registers <liveness-check>
@yesid/liveness-sdk/reactLivenessReact

Do not import from dist/*.

Web component

import { defineYesIdLiveness } from "@yesid/liveness-sdk/component";

defineYesIdLiveness();

React

import { LivenessReact } from "@yesid/liveness-sdk/react";

4. CDN (no bundler)​

<script type="module">
import { defineYesIdLiveness } from "https://js.yesid.tech/liveness/1.4.6/component.js";

defineYesIdLiveness();
</script>

5. Requirements​

RequirementValue
Node.js (npm installs)16+
Secure contextHTTPS (or localhost) — required for camera access
BrowsersChrome, Safari, Firefox, Opera
CameraFront camera with a clear view of the face
Secret keys stay on the server

Pass only the publishable key (pk_…) and a backend-created session ID to the browser. Never ship YESID_API_KEY / sk_… in frontend code or HTML.

Ready to integrate?

The package is installed. Next: Usage →