Installations
The Vida Web SDK offers two integration methods.
1. Integration via Script Tag
The quickest and simplest way to integrate the Vida Web SDK is to use the package hosted via Vida as a script tag. You can include the SDK in your application by adding the script tag directly to your index.html file or dynamically using JavaScript.
Add the following script tag for testing and POC purposes:
Use the following script tag for production applications:
Replace <VERSION> with the latest version provided to you (e.g., 1.1.0).
About Versioning
Vida Web SDK follows semantic versioning, a widely used versioning convention that ensures clear communication about the compatibility and changes in the software. Semantic versioning uses a MAJOR.MINOR.PATCH format:
MAJOR
Introduces significant changes that may not be backward compatible.
MINOR
Adds new features while maintaining backward compatibility.
PATCH
Includes bug fixes and minor updates without changing existing features or compatibility.
2. Integration via NPM Package
You can integrate the Vida Web SDK into your application as an npm package. This approach is ideal for modern web development workflows and allows better management of dependencies. TypeScript is officially supported in Vida web SDK npm package.
To install the SDK, use either of the following commands based on your package manager:
For Yarn
For NPM
For earlier version in sandbox , use the version with suffix sandbox.
This method ensures that the SDK is included in your project's node_modules directory, making it easy to manage and update.
Update Content Security Policy (CSP) Whitelist & Network Whitelist
To ensure seamless functionality of the Vida Web SDK, update your Content Security Policy (CSP) and network whitelist to allow the following resource:
script-src
'wasm-unsafe-eval' is required for face detection (WebAssembly).
Additional CSP Directives (Only required if you have these directives enforcement)
The SDK also makes API calls and loads additional resources based on the workflow configs. Add the following to your connect-src and img-src.
Production Env
Sandbox Env
Network / Firewall Whitelist
Allow outbound HTTPS (port 443) to: (only needed if SDK is used in an environment that enforces egress filtering or outbound firewall rules)
Last updated
