---
title: Get Selfie
description: 检索在 Human Token 流程中拍摄的自拍照 — 在流程完成后 24 小时内可用。
canonical: https://developer.unico.io/zh-CN/human-token/api-reference/get-selfie
locale: zh-CN
generated_by: markdown-export
---

- [/zh-CN/](/zh-CN/)
- API 参考
- Get Selfie

**本页内容Get SelfieGET检索在 Human Token 流程中拍摄的自拍照。

返回用户在 Human Token 流程中拍摄的生物识别自拍照。图像以 base64 编码字符串形式返回。
适用于执行了生物识别采集的任何已完成流程 — 所有五种 Human Token 流程（`api+humantoken`、`api+liveness+humantoken`、`api+liveness+humantoken+revalidation`、`humantoken`、`humantoken+revalidation`）。当流程在未进行生物识别采集的情况下完成时不可用，因为没有自拍照可返回。
警告自拍照在流程完成后 **24 小时**内可用。之后，图像将被永久删除，此端点返回 `404`。
### 端点​

环境URL**生产环境**`GET https://humantoken.unico.app/client/v1/process/{processId}/selfie`
### 请求​

请求头
Header值`x-unico-accesskey``<your_access_key>`（参见[身份验证](/zh-CN/human-token/get-started/authentication)）
路径参数
参数类型必填描述`processId`string (UUID)是由[创建流程](/zh-CN/human-token/api-reference/post-processes)返回的流程标识符。
### 示例​

cURLNode.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
```

### 响应​

200 OK
```
{  "fileContents": "/9j/4AAQSkZJR...",  "contentType": "image/jpeg"}
```

字段类型描述`fileContents`string (base64)拍摄的自拍照，base64 编码。`contentType`string图像的 MIME 类型 — `image/jpeg` 或 `image/png`。
### 错误代码​

400 Bad Request401 Unauthorized403 Forbidden404 Not Found429 Too Many Requests路径参数 `processId` 缺失或格式错误。`x-unico-accesskey` 请求头中的访问密钥缺失或无效。参见[身份验证](/zh-CN/human-token/get-started/authentication)。权限不足，无法访问此流程的自拍照。未找到流程、流程在没有生物识别采集的情况下完成，或 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](/zh-CN/developers/start/rate-limits).
### 后续步骤​

如需完整的流程结果，请参见[获取流程](/zh-CN/human-token/api-reference/get-process)。
返回[创建流程](/zh-CN/human-token/api-reference/post-processes)以发送新的自拍。
最后更新 于 2026年10月22日**