Video Verification Gesture
Introduction
The API response will include a token and a video URL to be loaded in the iframe. This API endpoint also provides customization options, such as changing the background color, logo URL, and text colors, as well as adding custom instructions for each gesture.
video verification is an iframe based product allows secure end-customer onboarding digitally. It helps you capture live randomized video of your end-user and match against a predefined ID proof/photograph. The system has advanced video fraud detection capabilities which eliminate identity theft in user onboarding process. Thus ensuring secure yet simple customer onboardings.
If you have a web based application (be it mobile web or desktop web) you can access this through an iframe. In your mobile application you can use webview. If you have ever integrated iframe based payment gateways, you would find this to be very similar:
Bet you already knew this, so let's get to the meat of how to get this done.
Gestures
From the availaible gestures you have to give gestureSequenceLength minimum 3 to maximum 7.
Following is the list of gestures.
- Blink
- Smile
- Yawn
- Left
- Right
The system will arrange these gestures in randomized way so that every time user will be presented to a new sequence of gesture. In this way user can't forge the sequence.
Product Flow
- User initiates a video verification.
- Signzy iframe takes over and asks a user to perform randomized Sequence of gesture, at end ask user to speak aloud the number presented to them. After the process gets completed, whole recorded video gets processed by AI server.
- This video data now passes onto the backend fraud detection engine. Final output of the product gives 2 different scores and two boolean values which achieves the following.
- Predict if the user present in the video is same as the one in ID proof.
- Ensure that the a live person was present infront of the camera. Static photo risk and Pre-recorded video risk scores indicate chances of fraud on this front.
While integrating it in iframe allow the microphone and camera in attribute of iframe tag. allow="camera; microphone;"
After integration you can listen for an event named videoUploadingDone in your parent window to know exactly when the whole video verification process has completed. Below is the code for the listening of this event.
Integration Flow
Logging in
You would have understood logging in by now. In case you are only integrating video verification you can understand logging in from Authentication section.
Create URL
Once you are logged in, you need to initiate video verification session by creating a url in the following manner.
Note: Before initiating a video verification session you will also need to pass a matchUrl which can be an array of ID/ face images. You can use your own filesystem or use our system as explained in our file exchange section. please note that rotated images are not supported.
Sample cURL
curl --request POST \
--url https://signzy.tech/api/v2/patrons/....patronid.../videoiframes \
--header 'Accept: */*' \
--header 'Accept-Language: en-US,en;q=0.8' \
--header 'Authorization: <Access-Token>' \
--header 'content-type: application/json' \
--data '{"task":"gestureUrl","essentials":{"matchImage":["...matchImage.."],"customVideoRecordTime":"..number between 5-30...(optional)","callbackUrl":"...callbackUrl.."}}'
Parameter | Data Type | Required | Description |
|---|---|---|---|
task | string | Yes | Specifies the task to be performed |
essentials | object | Yes | Contains the essential parameters for the task |
matchImage | array of strings | Yes | Array of images to match gestures against |
customVideoRecordTime | number | No | Time in seconds for which video recording should be done (default: 10s) |
callbackUrl | string | Yes | URL on which response will be pushed once the video verification is completed |
Sample response
{
"result": {
"token": "..token...",
"videoUrl": "..URL to be loaded in iframe..."
}
}
Parameter | Type | Required | Description |
|---|---|---|---|
result | Object | Yes | The response object containing the video token and URL |
result.token | String | Yes | The token generated for the video verification |
result.videoUrl | String | Yes | The URL to be loaded in an iframe for video verification |
Load videoUrl
Once you receive the videoUrl.
- In case of webapp product,load the URL in the iframe
- In case of mobile APP,
- implementation 'saschpe.android:customtabs:2.0.0'
- and instead of Webview, use:
- CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder() .addDefaultShareMenuItem() .setToolbarColor(this.getResources().getColor(R.color.colorPrimary)) .setShowTitle(true) .build(); // This is optional but recommended CustomTabsHelper.addKeepAliveExtra(this, customTabsIntent.intent); // This is where the magic happens... CustomTabsHelper.openCustomTab(this, customTabsIntent, Uri.parse("...video url that u have recieved..."), new WebViewFallback());
The session will now record the video of the end- customer.
Getting the results:
If Callback URL is provided then whole response/error in JSON format will be posted(POST METHOD) is posted to that URL.
Sample curl Request for Video Verification Get Data Request
curl --request POST \
--url https://signzy.tech/api/v2/patrons/....patronid.../videoiframes \
--header 'Accept: */*' \
--header 'Accept-Language: en-US,en;q=0.8' \
--header 'Authorization: <Access-Token>' \
--header 'content-type: application/json' \
--data '{"task":"getData","essentials":{"token":"...token..","patronId":"...patronId.."}}'
Parameter | Data Type | Required | Description |
|---|---|---|---|
task | string | Yes | The task to be performed, set to "getData" for this API endpoint. |
essentials.token | string | Yes | Token that was received in the response of the "gestureUrl" task. |
essentials.patronId | string | Yes | Unique identifier for the user's patron. |
Sample Response
// Expected response
{
"result": {
"token": "...token..",
"videoUrl": "..URL loaded in iframe...",
"callbackUrl":"...callback url....",
"gestureSequenceLength": "..total no of gestures...",
"isUsed": 1,
"videoVerification": {
"videoFaceMatch": [
{
"videoImages": [
"...images extracted from the video... "
],
"finalMatchImage": "matchImage used for the the video",
"matchStatistics": {
"coVariance": "..coVariance..",
"matchPercentage": "..average percentage match of the images.."
}
}
],
"audioMatch": {
"matchAudioScore": "...audio match with the random text shown on the screen.."
},
//This blocks has value when more than one match Images are passed
"matchImageFaceMatch": {
"verified": "true/false",
"message": "...Verification result in text..",
"matchPercentage": "..percentage match of the images.."
},
"videoForensics": {
"staticRisk": "..whether a static photo is used to record the video..",
"prerecordedRisk": "..whether a precorded video is used to record the video..",
"videoLandMarks": "..url of face tracked video",
"faceLandMarks": ["..url of face demarcated image.."]
},
"video": "... video url ....",
"videoStartTime": 1579094778212,
"gestureSequence": [
"2"
],
"gestureFaceTimeStamps": [
[]
]
}
}
}
Parameter Name | Data Type | Required | Description |
|---|---|---|---|
token | string | Required | Unique token generated for each video verification request. |
videoUrl | string | Required | URL to be loaded in the iframe. |
callbackUrl | string | Required | URL on which response to be pushed once the video verification is completed. |
gestureSequenceLength | integer | Required | Total number of gestures in the video verification sequence. |
isUsed | integer | Required | Whether the token has already been used or not. |
matchImageFaceMatch | object | Optional | Verification result when more than one match images are passed. |
verified | boolean | Optional | Verification result, true if match is successful and false if match is unsuccessful. |
message | string | Optional | Verification result message in text. |
matchPercentage | float | Optional | Percentage match of the images. |
videoForensics | object | Required | Forensic analysis of the video. |
staticRisk | boolean | Required | Whether a static photo is used to record the video. |
prerecordedRisk | boolean | Required | Whether a prerecorded video is used to record the video. |
videoLandMarks | string | Required | URL of face tracked video. |
faceLandMarks | array of strings | Required | URLs of face demarcated images. |
video | string | Required | URL of the recorded video. |
videoStartTime | integer | Required | Timestamp when the video recording started. |
gestureSequence | array of integers | Required | Sequence of gestures used in the video verification. |
gestureFaceTimeStamps | array of arrays | Required | Timestamps of each gesture in the video verification. |