Skip to main content

The FaceReconOptions object

startFaceRecon parameters

ParameterTypePurposeRequired
environmentCAAS_ENVIRONMENTEnum used to set the execution environment to SANDBOX or PRODUCTION.Yes.
client_session_keystringTemporary authentication key obtained through a server-to-server request to the Face Recognition API. See Implementation.Yes.
optionsFaceReconOptionsOptional object with the SDK's visual, textual and behavioral customizations.No.

FaceReconOptions

All fields are optional. When a field is not provided, the native SDK applies its default value.

type FaceReconOptions = {
session_id?: string;
document_number?: string;
font_color?: string;
background_color?: string;
font_family?: CAAS_FONT_FAMILY;
show_introduction_screens?: boolean;
show_success_screen?: boolean;
show_invalid_token_screen?: boolean;
audio_configuration?: FACE_RECON_AUDIO_CONFIGURATION;
onboarding_text_configuration?: OnboardingTextConfiguration;
log_level?: CAAS_LOG_LEVEL;
};
ParameterTypePurposeDefault
session_idstringKey identifying the session started in the SDK. It is used to trace the entire flow taken by the user through logs. Accepts up to 255 characters.Generated internally.
document_numberstringThe user's document number (CPF), used exclusively for anti-fraud identification.Not sent.
font_colorstringFont and icon color of the SDK screens, in hexadecimal format (e.g. "#FFFFFF")."#000000"
background_colorstringBackground color of the SDK screens, in hexadecimal format (e.g. "#000000")."#FFFFFF"
font_familyCAAS_FONT_FAMILYFont used on the SDK screens.CAAS_FONT_FAMILY.OPEN_SANS
show_introduction_screensbooleanWhen false, disables the introduction screens shown before the liveness proof.true
show_success_screenbooleanWhen false, disables the success screen shown after the capture.true
show_invalid_token_screenbooleanWhen false, disables the screen shown when the client_session_key is invalid or has expired.true
audio_configurationFACE_RECON_AUDIO_CONFIGURATIONConfigures the spoken voice guidance, which narrates the capture instructions in real time.FACE_RECON_AUDIO_CONFIGURATION.DISABLE
onboarding_text_configurationOnboardingTextConfigurationCustomizes the onboarding screen texts.SDK default texts.
log_levelCAAS_LOG_LEVELVerbosity level of the SDK logs.CAAS_LOG_LEVEL.DEBUG
Warning

The document_number field does not trigger face registration — it is used solely for anti-fraud identification.

OnboardingTextConfiguration

type OnboardingTextConfiguration = {
onboarding_title?: string;
onboarding_first_label?: string;
onboarding_second_label?: string;
onboarding_third_label?: string;
};
ParameterTypePurpose
onboarding_titlestringOnboarding screen title.
onboarding_first_labelstringFirst instruction shown to the user.
onboarding_second_labelstringSecond instruction shown to the user.
onboarding_third_labelstringThird instruction shown to the user.

Enums

CAAS_ENVIRONMENT

enum CAAS_ENVIRONMENT {
PRODUCTION = 'production',
SANDBOX = 'sandbox',
}

CAAS_FONT_FAMILY

enum CAAS_FONT_FAMILY {
JAKARTA = 'jakarta', // iOS only
FUTURA = 'futura', // iOS and Android
VERDANA = 'verdana', // iOS and Android
TREBUCHET_MS = 'trebuchetms', // iOS only
TAMILSANGAM_MN = 'tamilsangammn', // iOS only
OPEN_SANS = 'open_sans', // iOS and Android
HELVETICA = 'helvetica', // Android only
POPPINS = 'poppins', // Android only
ROBOTO = 'roboto', // Android only
SYSTEM_FONT = 'system_font', // iOS only
}
Warning

Font availability varies by platform. If an unsupported font is passed, the platform's default font is used. For cross-platform consistency, use FUTURA, VERDANA or OPEN_SANS.

FACE_RECON_AUDIO_CONFIGURATION

enum FACE_RECON_AUDIO_CONFIGURATION {
ENABLE = 'enable', // shows the audio toggle, with narration starting off
DISABLE = 'disable', // disables narration and hides the toggle
ACCESSIBILITY = 'accessibility', // shows the toggle with narration starting on when accessibility features are active
}

CAAS_LOG_LEVEL

enum CAAS_LOG_LEVEL {
TRACE = 'trace',
DEBUG = 'debug',
LOG = 'log',
INFO = 'info',
WARN = 'warn',
ERROR = 'error',
}