Skip to main content

Veritran Docs

CaptureSelfie

This function initializes the selfie capture process. This process can be performed in two different ways:

  1. Normal mode: One selfie of the user not smiling is taken and returned in base64 in the value of Register 290.

  2. Selfie Alive mode: Two selfies are taken. One of the user smiling and one of the user not smiling. One of the selfies is used for authentication and is returned in base64 in the value of Register 290. The other selfie is used for biometric identification and is returned in base64 in the value of Register 291. This mode is activated by default with the livePhoto parameter of the JSON provided as input parameter in Register 390.

Parameter Configuration

This function requires you to customize the SDK by completing the value of Register 390 (Input parameters) with a JSON.

Function ID

Register

Value

110

1

Input Registers

Register

Description

Mandatory

Value

390

JSON for the customization of the SDK

X

The values shown are the default values provided when entering an empty JSON {}. It is also possible not to include every value in the JSON.

{
"livePhoto":"YES",
"smartSelfie":"NO",
"closeButton":"YES",
"veridasLogoShow":"NO",
"showSelfie":"YES",
"infoAlertShow":"NO",
"showTutorial":"NO",
"tickCircleColor":"#3edc1c",
"tickColor":"#ffffff",
"smileRequestSmile":"Now, smile!",
"smileRequestSerious":"Nice smile! Now, without smiling.",
"searchingFaceStepInstruction":"Center your face within the frame and remain steady",
"checkSelfieText":"If the capture is OK, tap Continue.",
"faceDetectedOkColor":"#3edc1c",
"faceDetectedNotCenteredColor":"#fc321e",
"continueButtonBackgroundColor":"#1973B8",
"continueButtonTextColor":"#ffffff",
"continueButtonText":"Continue",
"repeatButtonBackgroundColor":"#072146",
"repeatButtonTextColor":"#5BBEFF",
"repeatButtonText":"Repeat",
"backgroundColor":"#072146"
}
Output Registers

Register

Description

Value

112

Call Result

000

SELFIE_CAPTURED_SUCCESSFULLY

001

JSON_EMPTY_ERROR

002

SDK_PREVIOUSLY_STARTED_ERROR

003

JSON_SYNTAX_ERROR

004

SELFIE_PARSE_ERROR

005

SDK_ERROR (SDK internal error)

290

Selfie 1

Base64 string

291

Selfie 2 (only if Selfie Alive is activated)

Base64 string