Comment on page
Launching the Plugin
The plugin window is launched with
open(options)
method:OzLiveness.open({
lang: 'en',
action: [
'photo_id_front', // request photo ID picture
'video_selfie_blank' // request passive liveness video
],
meta: {
// Your unique identifier that you can use later to find this folder in Oz API
// Optional, yet recommended
'transaction_id': '<your_transaction_id>',
// You can add iin if you plan to group transactions by the person identifier
'iin': '<your_client_iin>',
// Other meta data
'meta_key': 'meta_value',
},
on_complete: function (result) {
// This callback is invoked when the analysis is complete
// It is recommended to commence the transaction on your backend,
// using transaction_id to find the folder in Oz API and get the results
console.log('on_complete', result);
},
on_capture_complete: function (result) {
// Handle captured data here if necessary
console.log('on_capture_complete', result);
}
});
Call
GET /api/folders/?meta_data=transaction_id==<your_transaction_id>
to find a folder in Oz API from your backend by your unique identifier.The full list of
OzLiveness.open()
parameters: options
– an object with the following settings:token
– (optional) the auth token;license
– an object containing the license data;licenseUrl
– a string containing the path to the license;lang
– a string containing the identifier of one of the installed language packs;meta
– an object with names of meta fields in keys and their string values in values. Metadata is transferred to Oz API and can be used to obtain analysis results or for searching;params
– an object with identifiers and additional parameters:extract_best_shot
–true
orfalse
: run the best frame choice in the Quality analysis;
action
– an array of strings with identifiers of actions to be performed. Available actions:photo_id_front
– photo of the ID front side;photo_id_back
– photo of the ID back side;video_selfie_left
– turn head to the left;video_selfie_right
– turn head to the right;video_selfie_down
– tilt head downwards;video_selfie_high
– raise head up;video_selfie_smile
– smile;video_selfie_eyes
– blink;video_selfie_scan
– scanning;video_selfie_blank
– no action, simple selfie;video_selfie_best
– special action to select the best shot from a video and perform analysis on it instead of the full video.
overlay_options
– the document's template displaying options:show_document_pattern
:true/false
–true
by default, displays a template image, if set tofalse
, the image is replaced by a rectangular frame;
on_submit
– a callback function (no arguments) that is called after submitting customer data to the server (unavailable for thecapture
mode).on_capture_complete
– a callback function (with one argument) that is called after the video is captured and retrieves the information on this video. The example of the response is described here.on_result
– a callback function (with one argument) that is called periodically during the analysis and retrieves an intermediate result (unavailable for thecapture
mode). The result content depends on the Web Adapterresult_mode
configuration parameter and is described here.on_complete
– a callback function (with one argument) that is called after the check is completed and retrieves the analysis result (unavailable for thecapture
mode). The result content depends on the Web Adapterresult_mode
configuration parameter and is described here.on_error
– a callback function (with one argument) that is called in case of any error happened during video capturing and retrieves the error information: an object with the error code, error message, and telemetry ID for logging.on_close
– a callback function (no arguments) that is called after the plugin window is closed (whether manually by the user or automatically after the check is completed).device_id
– (optional) identifier of camera that is being used.