Saltar al contenido principal

/v2/identity

This service performs both the liveness test validation and facial validation between the two faces, whether they are open images or tokenized parameters.

This service adapts to two types of facial validations, depending on the integrated widget:

precaución
  • Method 3 WEB: facial authentication between an open image and bestImageToken
  • Method 5 MOBILE: facial authentication between tokenFaceImage and bestImageToken

Integration

For validation type 3, an open-format image of the front of the ID card, where the face is located, is required.

For validation type 5, it is necessary to implement the SelphID Mobile widget to generate the TokenFaceImage property.

Request:

curl --location '{IDENTITY_API_BASE_URL}/onboarding/v2/identity' \
--header 'x-api-key: {API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"token1": "/9j/4AAQSkZJRgABAQAASAB....",
"bestImageToken": "BAMBAQLNHJoWGPj...",
"method": "3"
}'

Request parameters:

ParameterType (Content)RequiredDescription
token1String (Base64)YesImage used as a reference for facial comparison. It can be a base64 image or TokenFaceImage, depending on the method.
bestImageTokenString (Base64)YesTokenized bestImage property generated by the Selphi widget and tokenized using native function.
methodStringYesIndicates the invoked comparison method according to the following specification:
- Method = “3” - Facial authentication using an open image and tokenized bestImage (Base64 & bestImageToken)
- Method = “5” - Facial authentication using the token generated by the document photo crop and tokenized bestImage (tokenFaceImage & bestImageToken)

Example response:

{
"serviceTransactionId": "2db602ee-3564-4304-af95-92a52eaae12d",
"serviceResultCode": 0,
"serviceResultLog": "[identity] Service executed ok",
"serviceTime": "2235",
"facialAuthenticationResult": 3,
"facialAuthenticationLog": "Positive",
"facialAuthenticationSimilarity": 0.99214232,
"passiveLivenessResult": 3,
"passiveLivenessLog": "Live"
}

Response fields:

IdentifierTypeDescription
serviceTransactionIdStringTransaction identifier associated with the API request.
serviceResultCodeIntegerCode indicating the overall result of the service execution.
serviceResultLogStringDescriptive field of the service execution result. Provides details of errors or exceptions when they occur.
serviceTimeStringField indicating the processing time (milliseconds).
facialAuthenticationResultIntegerCode indicating the result of the facial matching.
facialAuthenticationLogStringDescriptive field of the facial matching result.
facialAuthenticationSimilarityFloatValue indicating the facial similarity between the document photo and the user-taken selfie. 1.0 = 100%
passiveLivenessResultIntegerCode indicating the result of the passive liveness test.
passiveLivenessLogStringDescriptive field of the passive liveness result.