Skip to main content
Get the selfieGET

Read the selfie captured for a process, by the id Human Plugin returned on create.

Markdown

GET /v1/processes/{id}/selfie

id is the UUID from the create response. The request has no body and no query parameters.

curl http://human-plugin.internal:8080/v1/processes/17e4546e-6109-4240-8c0b-4ba98474a104/selfie

Human Plugin does not keep a copy of the selfie: each call fetches it again.

Response​

200 OK, with the image in base64 and its type:

{
"fileContents": "/9j/4AAQSkZJRgABAQAAAQABAAD…",
"contentType": "image/jpeg"
}

To save it as a file:

curl -s http://human-plugin.internal:8080/v1/processes/17e4546e-6109-4240-8c0b-4ba98474a104/selfie \
| jq -r .fileContents | base64 -d > selfie.jpg

Availability​

  • There is a selfie only for a process that had one: sent in imageBase64 or captured from the person.
  • With a Journey flow, the selfie exists only after the person captures it. Until then the request is refused with 400 and a message that starts with process state must be finished. Read the process first, and get the selfie once it is PROCESS_STATE_FINISHED.
  • The selfie is available for a limited time after the process finishes. If you need it later, store it from this response.

Handling the image​

The selfie is biometric data. Human Plugin never stores or logs it, and the response is sent with Cache-Control: no-store. Keep it out of your gateway and application logs too.

Errors​

StatusmessageMeaning
400process state must be finished…A Journey process whose capture has not finished yet. Read the process first
404PROCESS_NOT_FOUNDThe id is not a UUID or is unknown
404SELFIE_NOT_FOUNDThe process has no selfie: it had no capture, it failed before it started, or the selfie is no longer available
4xxThe refusal messageThe request was refused. The reason is in message and details
502UPSTREAM_UNAVAILABLEThe selfie could not be fetched in time. Retry later
503DATABASE_UNAVAILABLEThe database failed. Retry later

Reads are safe to retry. A 404 does not change on a retry.

Next​

Process lifecycle