Human Token 프로세스 중 캡처된 셀피를 조회합니다.
Human Token 프로세스 중 사용자가 캡처한 생체 인식 셀피를 반환합니다. 이미지는 base64 인코딩 문자열로 반환됩니다.
생체 인식 캡처를 실행한 완료된 프로세스에서 사용할 수 있습니다 — 5개의 모든 Human Token 플로우(api+humantoken, api+liveness+humantoken, api+liveness+humantoken+revalidation, humantoken, humantoken+revalidation). 생체 인식 캡처 없이 프로세스가 완료된 경우에는 반환할 셀피가 없으므로 사용할 수 없습니다.
셀피는 프로세스 완료 후 24시간 동안 사용할 수 있습니다. 그 이후에는 이 미지가 영구적으로 삭제되며 이 엔드포인트는 404를 반환합니다.
Endpoint
| 환경 | URL |
|---|---|
| 프로덕션 | GET https://humantoken.unico.app/client/v1/process/{processId}/selfie |
요청
| 헤더 | 값 |
|---|---|
x-unico-accesskey | <your_access_key> (인증 참조) |
| 매개변수 | 유형 | 필수 | 설명 |
|---|---|---|---|
processId | string (UUID) | 예 | 프로세스 생성에서 반환된 프로세스 식별자입니다. |
예제
- 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
응 답
{
"fileContents": "/9j/4AAQSkZJR...",
"contentType": "image/jpeg"
}
| 필드 | 유형 | 설명 |
|---|---|---|
fileContents | string (base64) | 캡처된 셀피, base64 인코딩. |
contentType | string | 이미지의 MIME 유형 — image/jpeg 또는 image/png. |
오류 코드
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 404 Not Found
- 429 Too Many Requests
경로 매개변수 processId가 누락되었거나 형식이 잘못되었습니다.
x-unico-accesskey 헤더에 액세스 키가 없거나 유효하지 않습니다. 인증을 참조하세요.
이 프로세스의 셀피에 액세스할 권한이 부족합니다.
프로세스를 찾을 수 없거나, 생체 인식 캡처 없이 프로세스가 완료되었거나, 24시간 보존 기간이 만료되었습니다.
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.