Web SDK
Introduction
The VoveSDK for Web enables the straightforward integration of ID verification and KYC compliance into web applications. This SDK provides a simplified, JavaScript API, allowing developers to seamlessly integrate complex ID verification processes.
Installation
To incorporate the VoveSDK into your web project, you can install it via npm or Yarn:
npm install @vove-id/web-sdk
or
yarn add @vove-id/web-sdk
This package includes all necessary dependencies, ensuring a hassle-free setup without the need for additional configurations.
Usage
The core functionality of the VoveSDK is to facilitate ID verification through an easy-to-use function call. This function orchestrates the verification process, requiring a session token and an environment setting.
Starting ID Verification
To begin the ID verification process, utilize the processIDMatching
function. This function needs a session token (provided by your backend server) and an environment setting. It returns a promise that resolves with the verification outcome.
Function Signature
sessionToken
: A token from your backend, is required to start the ID verification session.environment
: Determines the SDK's operation environment, eitherVoveEnvironment.Production
orVoveEnvironment.Development
.onVerificationComplete
: An optional callback is executed with the verification status.publicKey: you can find it in the dashboard (Client Information section)
Example Usage
Handling Verification Results
The verification result is communicated through the onVerificationComplete
callback:
The callback is invoked with a status ("success", "pending", "canceled", or "failed"), indicating the verification outcome.
There is no need to handle a Promise's resolve or reject states since the process completion is managed through the callback function.
API Reference
start
start
Begins an ID verification session.
Parameters:
An object containing:
sessionToken
:string
: The session token for the verification process.environment
:VoveEnvironment
: The SDK's operational environment.onVerificationComplete
: An optional callback that is invoked with the verification status.publicKey: you can find it in the dashboard (Client Information section)
VoveEnvironment
VoveEnvironment
An enumeration specifying the SDK's operating environment:
Production
: Use for production builds.Sandbox
: Use for development or testing purposes.
Link Integration: Using Query Parameters
In addition to the standard SDK integration, you can also integrate VoveSDK using a simple link with query parameters.
How It Works
Parameter Conversion: All parameters normally passed to the SDK (such as
authToken
,environment
,publicKey
, etc.) can be provided directly in the URL as query parameters.Callback Handling: The user is redirected to the provided URL with an additional
status
query parameter that indicates the verification result (e.g.,success
,pending
,canceled
, orfailed
).
Example Integration Link
You can create a link like this:
Handling the Redirect
On your callback page (e.g., https://yourdomain.com/verification-callback
), retrieve and process the verification status as follows:
Troubleshooting
Ensure the session token is correctly generated and passed, and the appropriate environment is selected based on your application's stage. For unresolved issues, contact support with detailed information about the problem, including error messages and steps leading up to the issue.
Last updated