Core concepts
Error codes
Branch on error, not on message; messages are written for people and may change.
Error codes#
| Code | HTTP | Meaning |
|---|---|---|
| unauthorized | 401 | Missing, malformed, revoked or expired API key. |
| forbidden_scope | 403 | The key doesn’t have the scope this endpoint needs. |
| account_type_forbidden | 403 | This endpoint isn’t available to your account type. |
| module_disabled | 403 | The module is switched off for your account. Contact FaceTrust. |
| ip_not_allowed | 403 | The request came from an IP outside the key’s allowlist. |
| not_found | 404 | No such resource in your institution. |
| validation_failed | 422 | The request body failed validation; see fields for per-field errors. |
| duplicate_primary_key | 409 | Another person already has this primary key. |
| duplicate_face | 409 | This face is already enrolled for another person in the registry. Includes match. |
| vip_requires_restricted_access | 422 | A sign-up form open to anyone can’t hand out a VIP-type value. Use access code or allowlist. |
| liveness_failed | 422 | The image failed the liveness check. Includes referenceId. |
| no_face_detected | 422 | No face was found in the image. |
| multiple_faces_detected | 422 | More than one face was found in the image. |
| not_eligible | 409 | The student isn’t on this exam’s eligibility list. |
| exam_ended | 409 | The exam (or its late-entry window) has ended. |
| already_resolved | 409 | The referral was already resolved. |
| idempotency_conflict | 409 | This Idempotency-Key was used with a different request body. |
| rate_limited | 429 | Too many requests. Wait for Retry-After seconds. |
Error response#
Error response · 422
{
"error": "validation_failed",
"message": "fields.level must be one of: 100, 200, 300, 400, 500",
"requestId": "req_01JD95",
"fields": {
"level": "Must be one of: 100, 200, 300, 400, 500"
}
}Need help? Email info@facetrustai.com and quote the requestId from the error response.