POST Endpoint

POST /identify

Authenticate users and retrieve verified identity data with biometric verification.

Endpoint

API Endpoint
POST https://identify.api.uip.id/v1/identify

Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body

{
  "webhook_url": "https://yourapp.com/webhooks/uip",
  "requested_data": ["full_name", "date_of_birth"]
}

Parameters

ParameterTypeRequiredDescription
webhook_urlstringYesURL to receive authentication results
requested_dataarrayNoData fields to request: full_name, date_of_birth, country_of_origin, personal_number

Response

{
  "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
}

Code Implementation

// 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 =
      'UIP Auth QR';
  }

  return data.session_id;
}

// Usage
identifyUser(['full_name', 'date_of_birth']);

Webhook Response

{
  "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"
}

Common Use Cases

1 Passwordless Login

Replace traditional email/password authentication with secure biometric verification, providing seamless user experience across devices.

2 Identity Verification

Request verified identity data for KYC compliance, age verification, or access control with government-backed identity proof.

3 Cross-Border Authentication

Enable global authentication without country-specific setups, providing unified identity verification for international platforms.