Authenticate users and retrieve verified identity data with biometric verification.
https://identify.api.uip.id/v1/identify
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"webhook_url": "https://yourapp.com/webhooks/uip",
"requested_data": ["full_name", "date_of_birth"]
}
Parameter | Type | Required | Description |
---|---|---|---|
webhook_url | string | Yes | URL to receive authentication results |
requested_data | array | No | Data fields to request: full_name, date_of_birth, country_of_origin, personal_number |
{
"session_id": "sess_1234567890abcdef",
"qr_data": "uip://identify/sess_1234567890abcdef",
"mobile": false,
"qr_image_url": "https://qr.uip.id/sess_1234567890abcdef.png",
"expires_in": 180
}
// JavaScript
async function identifyUser(requestedFields = []) {
const response = await fetch('https://identify.api.uip.id/v1/identify', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + YOUR_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
webhook_url: 'https://yourapp.com/webhooks/uip',
requested_data: requestedFields
})
});
const data = await response.json();
if (data.mobile) {
window.location.href = data.qr_data;
} else {
document.getElementById('qr-container').innerHTML =
'
';
}
return data.session_id;
}
// Usage
identifyUser(['full_name', 'date_of_birth']);
{
"event": "authentication_completed",
"session_id": "sess_1234567890abcdef",
"status": "success",
"user_data": {
"uip_id": "uip_user_9876543210",
"full_name": "Alice Johnson",
"date_of_birth": "1990-05-15",
"country_of_origin": "US",
"verification_level": "government_id"
},
"timestamp": "2024-01-15T10:30:00Z"
}