Get Face Authen
Reads the status of a user's face profile. Use it to check whether a user is enrolled before starting an authentication.
Endpoint
http
POST /v1/get_face_auth
Content-Type: application/jsonjson
{
"user_id": "user_00000001"
}Parameters:
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
user_id | string | Yes | — | User ID of the customer. |
Returns: GetFaceAuthResponse
Sample Request
bash
curl -X POST \
'<BASE_URL>/v1/get_face_auth' \
-H 'Authorization: ATV <ACCESS_ID>:<SIGNATURE>' \
-H 'X-TV-Timestamp: <TIMESTAMP>' \
-H 'Content-Type: application/json' \
-d '{
"user_id": "user_00000001"
}'Response
json
{
"data": {
"status": "success",
"request_id": "cfc7b8d5-f2e2-437b-80e5-d600dfad26e2",
"face_auth": {
"user_id": "user_00000001",
"status": "VERIFIED"
}
},
"errors": [],
"success": true,
"code": 0,
"message": "Success"
}| Field | Type | Description |
|---|---|---|
data.status | string | success or failure — whether the lookup itself succeeded. |
data.request_id | string | Request ID; quote it to CAKE Support when checking logs. |
data.face_auth.user_id | string | The user ID the profile belongs to. |
data.face_auth.status | string | Profile status, e.g. VERIFIED. |
data.status reports the lookup; data.face_auth.status reports the profile. A successful lookup of an unusable profile still returns data.status: "success".
Errors
| Code | Message |
|---|---|
2001010 | Access ID not found. |
401100 | You are not authorized to perform the action. |
4001000 | Input parameter violates a constraint. |
4001001 | The X-TV-Timestamp header is expired, need a newer one. |
4041001 | User not found. |
5001000 | Some unexpected error occurs while processing the request. |
| Code | Description |
|---|---|
access_id_not_found | Access ID not found. |
access_denied_exception | You are not authorized to perform the action. |
invalid_parameter_exception | Input parameter violates a constraint. |
request_time_too_skewed | The X-TV-Timestamp header is expired, need a newer one. |
user_not_found_exception | User not found. |
internal_server_error | Some unexpected error occurs while processing the request. |
Next Steps
- Register Faces — enrol a user who has no profile yet
- Verify Face Authen — authenticate an enrolled user