Rufen Sie das während eines Human Token-Prozesses aufgenommene Selfie ab.
Gibt das biometrische Selfie zurück, das der Nutzer während eines Human Token-Prozesses aufgenommen hat. Das Bild wird als base64-kodierte Zeichenkette zurückgegeben.
Verfügbar für jeden abgeschlossenen Prozess mit biometrischer Erfassung — alle fünf Human Token-Flows (api+humantoken, api+liveness+humantoken, api+liveness+humantoken+revalidation, humantoken, humantoken+revalidation). Nicht verfügbar, wenn der Prozess ohne biometrische Erfassung abgeschlossen wurde, da kein Selfie vorhanden ist.
Das Selfie ist 24 Stunden nach Abschluss des Prozesses verfügbar. Danach wird das Bild dauerhaft gelöscht und dieser Endpunkt gibt 404 zurück.
Endpunkt
| Umgebung | URL |
|---|---|
| Produktion | GET https://humantoken.unico.app/client/v1/process/{processId}/selfie |
Request
| Header | Wert |
|---|---|
x-unico-accesskey | <your_access_key> (siehe Authentifizierung) |
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
processId | string (UUID) | ja | Von Prozess erstellen zurückgegebene Prozesskennung. |
Beispiel
- cURL
- Node.js
curl -X GET https://humantoken.unico.app/client/v1/process/$PROCESS_ID/selfie \
-H "x-unico-accesskey: $UNICO_ACCESS_KEY"
import fetch from 'node-fetch';
const res = await fetch(
`https://humantoken.unico.app/client/v1/process/${processId}/selfie`,
{ headers: { 'x-unico-accesskey': process.env.UNICO_ACCESS_KEY } }
);
const { fileContents, contentType } = await res.json();
// fileContents is a base64-encoded image string
Antworten
{
"fileContents": "/9j/4AAQSkZJR...",
"contentType": "image/jpeg"
}
| Feld | Typ | Beschreibung |
|---|---|---|
fileContents | string (base64) | Das aufgenommene Selfie, base64-kodiert. |
contentType | string | MIME-Typ des Bildes — image/jpeg oder image/png. |
Fehlercodes
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
Der Pfadparameter processId fehlt oder ist fehlerhaft.
Zugriffsschlüssel fehlt oder ist im Header x-unico-accesskey ungültig. Siehe Authentifizierung.
Unzureichende Berechtigungen für den Zugriff auf das Selfie dieses Prozesses.
Prozess nicht gefunden, der Prozess wurde ohne biometrische Aufnahme abgeschlossen, oder das 24-Stunden-Aufbewahrungsfenster ist abgelaufen.
Rate limit reached. When your system receives an HTTP 429 error, you must implement mechanisms to prevent cascading failures and avoid worsening the restriction.
Best practices:
- Cool-down period (backoff): Immediately halt or throttle subsequent requests from your system. Do not continuously retry failed requests in a tight loop.
- Queueing & throttling: Buffer or queue outgoing requests on your end to control the traffic flow before re-sending them.
- Exponential backoff with jitter: When retrying, increase the waiting time exponentially between attempts (e.g., 1 s, 2 s, 4 s, 8 s) and add a small random delay ("jitter") to prevent a herd effect where all queued requests retry at the exact same millisecond.
Continuously hitting a rate-limited endpoint without backing off can prolong the restriction period and severely impact your system's operational throughput. Properly throttling requests on your side ensures a smoother, more resilient integration.
For default limits, increase requests and additional details, see Rate Limits.
Nächste Schritte
- Für das vollständige Prozessergebnis siehe Prozess abrufen.
- Zurück zu Prozess erstellen, um ein neues Selfie zu senden.