Required Parameters
When integrating the Liveness SDK, you will need to provide the following parameters:-
serviceBaseUrl
The endpoint where the liveness service is hosted.
• For Demo environments, use:https://d1.cynopsis.co/service
• For Production environments, use:https://util.cynopsis.co/service -
accessToken
The authentication token required to access the SDK services.
Obtain your access token by referring to the Authentication section above. -
domainId
Your unique domain identifier, provided by Cynopsis Solutions or your system administrator. -
provider
The liveness provider version. Currently, set this to:V2
Intergrate SDK
To start integrating the SDK with your application codebase, follow the sample code provided for your platform below. Each example shows how to initialize and configure the SDK using the required parameters, helping you get up and running quickly.- Web Browser
- Android
- iOS
Web Browser Integration
- Download Web SDK
- Install the SDK in your React project:
Note: The Web SDK requiresreactandreact-dom(version>=16.8.0), as well asreact-cs-liveness.
- Integrate the Liveness component
- Vanilla JS (CommonJS)
- React
- Vue
- Angular
About Code Splitting & Custom Chunking
If your project uses custom code-splitting or defines manual chunks (such as in a Vite or Webpack config), make sure allreact-cs-liveness dependencies are kept together in the same chunk. Incorrect configuration may cause runtime issues related to duplicate React instances or missing dependencies, especially when using React 18+ or advanced bundling.- We recommend not setting custom chunking rules for the SDK or to use our provided plugins (see below) to ensure correct bundling.
- If you are not sure about your chunking setup, test your build to ensure the Liveness component loads and works as expected.
Click here for Vite setup instructions
Click here for Vite setup instructions
If your project uses Vite, we strongly recommend using our official This setup ensures
liveness() Vite plugin from react-cs-liveness/config.
This plugin ensures correct code-splitting and chunking for all react-cs-liveness dependencies, avoiding runtime errors (like React 18+ createRoot issues) that commonly occur when custom manualChunks are defined.For example, with a Vue project:react-cs-liveness and all its internal dependencies are correctly bundled—no matter your framework or chunking rules. The mergeWithExisting: true option integrates seamlessly with your app’s existing Vite code-splitting configuration.