Use this file to discover all available pages before exploring further.
Get up and running with UIP’s Identify API in minutes. This guide walks you through creating your first identity verification session with working code examples.
Prerequisites: You need an API key from uip.digital. New accounts get $20 in credits on their first business.
The QR code is returned as a base64 PNG data URI. Use device detection to show the right UX:
Desktop users — display the QR code image for scanning
Mobile users — display an “Open UIP” button that links to https://www.uip.id/{session_id}
<!-- Device detection: show QR on desktop, deep link on mobile --><div id="uip-desktop"> <img id="uip-qr" alt="Scan with UIP app to verify identity" /> <p>Scan with UIP app</p></div><div id="uip-mobile" style="display: none;"> <a id="uip-link" class="button">Open UIP</a></div><script> const isMobile = /iPhone|iPad|Android/i.test(navigator.userAgent); if (isMobile) { document.getElementById('uip-desktop').style.display = 'none'; document.getElementById('uip-mobile').style.display = 'block'; document.getElementById('uip-link').href = `https://www.uip.id/${sessionId}`; } else { // qr_code from API response is a base64-encoded PNG data URI document.getElementById('uip-qr').src = qrCode; }</script>
Session lifetime: Sessions expire after 5 minutes. Show a timer and offer to generate a new session if it expires.
Future SDK: A client-side SDK is planned that will handle device detection, QR rendering, and polling automatically. For now, implement this logic in your application.
Poll GET /v1/identify/:id every 2-3 seconds. When the status changes to completed, the response includes all the verified identity data in the same response.
async function pollIdentify(sessionId, apiKey) { while (true) { const res = await fetch( `https://api.uip.digital/v1/identify/${sessionId}`, { headers: { 'Authorization': `Bearer ${apiKey}` } } ); const data = await res.json(); if (data.status === 'completed') { // All verified data is right here console.log(`Verified: ${data.first_name} ${data.last_name}`); console.log(`Audit ID: ${data.audit_id}`); return data; } if (data.status === 'expired') { throw new Error('Session expired'); } // Still pending -- wait and poll again await new Promise(r => setTimeout(r, 2500)); }}