Web API


Welcome to Web API, an offering within YooniK Services.

The Web API is built as a RESTful API hosted on the cloud. All requests and responses are encoded in JSON. The YooniK Web API was designed to expose complex biometric functionalities via a simple REST API that can be integrated virtually in any programming language, in any environment.

Use cases

{primary} Passwordless login

Web API allows the creation of passwordless login applications in a simple and secure. For testing a passwordless login, please take a look at YooniK login.

{primary} Second factor authentication

YooniK Web is can be used as part of most prominent identity solutions marketplaces. such as Auth0, Okta and Onelogin.

Face authentication endpoints

User authentication

Endpoint that extracts a biometric template from a user selfie, and matches it against the registration template.

Additionally, several quality checks are made to validate the selfie image.

POST | {base_url}/user_verification

Accepts: Verify user request

{success} Success

Status Meaning Schema
200 OK Verify user response

{danger} Error responses

Status Meaning Schema
400 Bad Request Error message
401 Unauthorized N/A
500 Internal Server Error N/A

User deletion

Endpoint that deletes all the data related to specified user.

DELETE |  {base_url}/user_verification

Accepts: Delete User Request

{success} Success

Status Meaning Schema
204 No Content No schema

{danger} Error responses

Status Meaning Schema
400 Bad Request N/A
401 Unauthorized N/A
500 Internal Server Error N/A

Schemas

Verify user request

{
  "user_id": "string",
  "user_photo": "string",
  "create_if_new": true
}

Properties

Name Type Required Restrictions Description
user_id string True None User Id (to be used for recurrent verifications.
user_photo string True None Selfie image as BMP, PNG or JPG base 64 string.
create_if_new boolean True None Set True for registering the user if is new.

Verify user response

{
  "status": "string"
}

Properties

Name Type Required Restrictions Description
status string True None User verification status.

Enumerable types

Property Value Description
status SUCCESS Face authentication successful.
status NEW_USER Face signup successful.
status USER_NOT_FOUND User not registered.
status FAILED Face authentication failed.

Verify User Error Messages

There are specific error messages that can be returned along with a 400 Bad Request response:

Value Description
face_not_found Could not find a face in the image.
multiple_faces The image has more than one person.
quality_failed The provided image does not have enough quality or liveness test failed.

Delete User Request

{
  "user_id": "string"
}

Properties

Name Type Required Restrictions Description
user_id string True None User Id.

Samples & SDKs

Please check our Sample Web App in Flask for capturing a selfie using the webcam and performing face authentication using this API. This sample app handles YooniK's redirect action in Auth0.

We also have a Flask + Okta Hosted Login + YooniK Face Authentication example app that shows how to use Flask to log in to your application with an Okta Hosted Login page. The user first logs in using Okta-Hosted login, and then we perform a second-factor with face authentication using this API.