The FaceReconOptions object
startFaceRecon parameters
| Parameter | Type | Purpose | Required |
|---|---|---|---|
| environment | CaaSEnvironment | Enum used to set the execution environment to sandbox or production. | Yes. |
| clientSessionKey | 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.
| Parameter | Type | Purpose | Default |
|---|---|---|---|
| sessionId | 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. |
| documentNumber | String? | The user's document number (CPF), used exclusively for anti-fraud identification. | Not sent. |
| fontColor | String? | Font and icon color of the SDK screens, in hexadecimal format (e.g. "#FFFFFF"). | "#000000" |
| backgroundColor | String? | Background color of the SDK screens, in hexadecimal format (e.g. "#000000"). | "#FFFFFF" |
| fontFamily | CaaSFontFamily? | Font used on the SDK screens. | CaaSFontFamily.openSans |
| showIntroductionScreens | bool? | When false, disables the introduction screens shown before the liveness proof. | true |
| showSuccessScreen | bool? | When false, disables the success screen shown after the capture. | true |
| showInvalidTokenScreen | bool? | When false, disables the screen shown when the clientSessionKey is invalid or has expired. | true |
| audioConfiguration | FaceReconAudioConfiguration? | Configures the spoken voice guidance, which narrates the capture instructions in real time. | FaceReconAudioConfiguration.disable |
| onboardingTextConfiguration | OnboardingTextConfiguration? | Customizes the onboarding screen texts. | SDK default texts. |
| logLevel | CaaSLogLevel? | Verbosity level of the SDK logs. | CaaSLogLevel.debug |
Warning
From plugin version 5.0.0 onwards, the documentNumber field no longer triggers face registration — it is used solely for anti-fraud identification.
OnboardingTextConfiguration
| Parameter | Type | Purpose |
|---|---|---|
| onboardingTitle | String? | Onboarding screen title. |
| onboardingFirstLabel | String? | First instruction shown to the user. |
| onboardingSecondLabel | String? | Second instruction shown to the user. |
| onboardingThirdLabel | String? | Third instruction shown to the user. |
OnboardingTextConfiguration(
onboardingTitle: 'Important tips',
onboardingFirstLabel: 'Make sure your face is visible',
onboardingSecondLabel: 'Fit your face in the oval',
onboardingThirdLabel: 'Remove accessories that cover your face',
)
Enums
CaaSEnvironment
enum CaaSEnvironment {
production,
sandbox,
}
CaaSFontFamily
enum CaaSFontFamily {
jakarta, // iOS only
futura, // iOS and Android
verdana, // iOS and Android
trebuchetMs, // iOS only
tamilsangamMn, // iOS only
openSans, // iOS and Android
helvetica, // Android only
poppins, // Android only
roboto, // Android only
systemFont, // 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 openSans.
FaceReconAudioConfiguration
enum FaceReconAudioConfiguration {
enable, // shows the audio toggle, with narration starting off
disable, // disables narration and hides the toggle
accessibility, // shows the toggle with narration starting on when accessibility features are active
}
CaaSLogLevel
enum CaaSLogLevel {
trace,
debug,
log,
info,
warn,
error,
}