The FaceReconOptions object
startFaceRecon parameters
| Parameter | Type | Purpose | Required |
|---|---|---|---|
| environment | CAAS_ENVIRONMENT | Enum used to set the execution environment to SANDBOX or PRODUCTION. | Yes. |
| client_session_key | string | Temporary authentication key obtained through a server-to-server request to the Face Recognition API. See Implementation. | Yes. |
| options | FaceReconOptions | Optional 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;
};
| Parameter | Type | Purpose | Default |
|---|---|---|---|
| session_id | string | Key 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_number | string | The user's document number (CPF), used exclusively for anti-fraud identification. | Not sent. |
| font_color | string | Font and icon color of the SDK screens, in hexadecimal format (e.g. "#FFFFFF"). | "#000000" |
| background_color | string | Background color of the SDK screens, in hexadecimal format (e.g. "#000000"). | "#FFFFFF" |
| font_family | CAAS_FONT_FAMILY | Font used on the SDK screens. | CAAS_FONT_FAMILY.OPEN_SANS |
| show_introduction_screens | boolean | When false, disables the introduction screens shown before the liveness proof. | true |
| show_success_screen | boolean | When false, disables the success screen shown after the capture. | true |
| show_invalid_token_screen | boolean | When false, disables the screen shown when the client_session_key is invalid or has expired. | true |
| audio_configuration | FACE_RECON_AUDIO_CONFIGURATION | Configures the spoken voice guidance, which narrates the capture instructions in real time. | FACE_RECON_AUDIO_CONFIGURATION.DISABLE |
| onboarding_text_configuration | OnboardingTextConfiguration | Customizes the onboarding screen texts. | SDK default texts. |
| log_level | CAAS_LOG_LEVEL | Verbosity 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;
};
| Parameter | Type | Purpose |
|---|---|---|
| onboarding_title | string | Onboarding screen title. |
| onboarding_first_label | string | First instruction shown to the user. |
| onboarding_second_label | string | Second instruction shown to the user. |
| onboarding_third_label | string | Third 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',
}