Handle the image
After capturing an image with the face capture module, you can request our Age estimation endpoint to verify an individual's age. The base64 image obtained from the FCM module will need to be converted into a JPEG or PNG image. The image will need to be sent in the request body to the following endpoint:
Endpoint
Headers
Header | Description |
|---|---|
Yoti-Sdk-Id | Your unique SDK ID obtained from the Yoti Hub |
Content-Type | multipart/form-data; boundary |
Request Body
The request body must be sent as multipart form-data along with the relevant boundary.
Secure Image Capture (SICAP) is enforced to ensure the best security. The Web FCM secure object must be included in the request body.
Parameter | Type | Content-type | File Format | Description |
|---|---|---|---|---|
image | File | application/octet-stream | JPEG or PNG | Facial image of the user on which the age estimation is performed. The facial image captured from the web FCM is required to be converted from base64 into a JPEG/PNG image file first. The image should then be attached as one of the payload. Note: |
biometric_consent | File | text/plain | Plain text file without any file extension | A plain text file with a text string of either |
secure_token | Text | text/plain | Text string | The entire Not required for Mobile FCM integrations. |
Response
The response body is returned with the content type of application/json.
Error Codes
Error Code | Description |
|---|---|
| Potential Spoofing attempt detected |
| Payload too large. |
| Image has not been provided. |
|
|
| Image format not supported. Please use JPEGs (95 to 100 quality) and PNGs. |
| Image size too big, the maximum size is 1.5MB. |
| Image size too small, the minimum size is 50KB. |
| The image height is incorrect. Image minimum height required is 300 pixels. |
| The image height is incorrect. Image maximum height required is 2000 pixels. |
| The image width is incorrect. Image minimum width required is 300 pixels. |
| The image width is incorrect. Image maximum width required is 2000 pixels. |
| To process the image the minimum number of pixels required is 90,000 pixels. |
| To process the image the maximum number of pixels required is 2,100,000 pixels. |
| Missing colour channel, the input image must be RGB or RGBA. |
| Grayscale images not supported. |
| Face not found. |
| Multiple faces in the image provided. |
| The face in the image provided is too small. |
| Face ratio is lower than the minimum ratio. |
| Face ratio is bigger than the maximum ratio. |
| Insufficient area around the face in the image provided. |
| Image too bright. |
| Image too dark. |
| Request body is invalid. |
| An internal server error occurred. |
Retries
It's possible to trigger a check again when a success (fail) or an error response is returned with the same session. The prerequisite is that the value of attempts_remaining is greater than zero and retries_depleted is not true.
To trigger the retry check, you have to make the API call again with the same request body as mentioned at the top.