Create a Biometric Validation
Endpointβ
POST https://api.verifik.co/v2/biometric-validations
A Biometric Validation is an instance within Verifik's system that allows you to process and validate user identities through facial recognition and liveness detection. This process ensures the authenticity of users by verifying their unique biometric characteristics through advanced security technology.
Headersβ
Content-Typeβ
Type: String
Required: Yes
application/json
Authorizationβ
Type: String
Required: Yes
Bearer {YOUR_ACCESS_TOKEN}
Parametersβ
projectβ
Type: String
Required: Yes
The unique identifier for the project where this biometric validation will be used.
projectFlowβ
Type: String
Required: Yes
The unique identifier for the project flow configuration.
identifierβ
Type: String
Required: Yes
A unique identifier for the user or session (e.g., email, phone, or custom ID).
typeβ
Type: String
Required: Yes
Type of validation: validation, login, onboarding, or oneTimeLink.
expiresAtβ
Type: String
Required: No
Optional expiration date for the validation session.
redirectUrlβ
Type: String
Required: No
Optional URL for redirect after validation.
webhookUrlβ
Type: String
Required: No
Optional webhook URL for validation notifications.
requires2FAβ
Type: Boolean
Required: No
Optional flag indicating if two-factor authentication is required.
ipAddressβ
Type: String
Required: No
Optional IP address of the user.
sendViaEmailβ
Type: Boolean
Required: No
Optional flag to send validation link via email.
emailβ
Type: String
Required: No
Email address to send validation link to (required if sendViaEmail is true).
languageβ
Type: String
Required: No
Language for email templates (en/es). Defaults to "en".
type Valuesβ
validation- General biometric identity validation.login- Biometric verification during user authentication.onboarding- Biometric verification during user registration.
Requestβ
Requestβ
- Node.js
- Python
- PHP
- Go
const axios = require("axios");
const config = {
method: "post",
url: "https://api.verifik.co/v2/biometric-validations",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
data: {
project: "project_123456789",
projectFlow: "flow_123456789",
identifier: "user@example.com",
type: "validation",
expiresAt: "2024-01-15T11:30:00Z",
redirectUrl: "https://example.com/success",
webhookUrl: "https://example.com/webhook",
requires2FA: false,
ipAddress: "192.168.1.1",
sendViaEmail: true,
email: "user@example.com",
language: "en"
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
import json
url = "https://api.verifik.co/v2/biometric-validations"
payload = json.dumps({
"project": "project_123456789",
"projectFlow": "flow_123456789",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": False,
"ipAddress": "192.168.1.1",
"sendViaEmail": True,
"email": "user@example.com",
"language": "en"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.verifik.co/v2/biometric-validations',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"project": "project_123456789",
"projectFlow": "flow_123456789",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"sendViaEmail": true,
"email": "user@example.com",
"language": "en"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer YOUR_ACCESS_TOKEN'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.verifik.co/v2/biometric-validations"
payload := strings.NewReader(`{
"project": "project_123456789",
"projectFlow": "flow_123456789",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"sendViaEmail": true,
"email": "user@example.com",
"language": "en"
}`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Responseβ
{
"success": true,
"data": {
"_id": "biometric_validation_123456789",
"client": "client_123456789",
"project": "project_123456789",
"projectFlow": "flow_123456789",
"status": "new",
"identifier": "user@example.com",
"type": "validation",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"sendViaEmail": true,
"email": "user@example.com",
"language": "en",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}
Error Responsesβ
{
"success": false,
"error": "Invalid project flow",
"code": "INVALID_PROJECT_FLOW"
}