General¶
The SDK configuration is a data class that contains all the information required to launch the SDK. For launch details, see the API section of this documentation.
Configuration example¶
In the SelfieCaptureConfiguration, there are several parameters that can be adjusted to customize your experience.
All these parameters are nested within the main setup configuration object.
This object centralizes the customization of the SDK’s behavior and appearance, allowing you to adjust multiple aspects of the flow from a single place.
{
"medias": {},
"texts": {},
"styles": {},
"setup": {
"language": "es",
"uiOrientation": "landscape",
"liveness": "passive",
"challengeToken": "",
"jwtPublicKey": "",
"logoShow": true,
"closeButtonShow": true,
"instructionsShow": true,
"reviewShow": false,
"selectCamera": "front",
"detectionTimeout": 300000,
"helpModalShow": true,
"captureHeadingShow": true
}
}
| Parameter | Description | Default Value | Possible Values |
|---|---|---|---|
| language | Language of the default texts | device language (English if not supported) | es, en |
| uiOrientation | Determines the screen orientation | portrait | landscape, portrait |
| liveness | Determines whether the selfie flow is active or passive | passive | passive or active |
| challengeToken | Valid token for active flow | -------------------------------------------- | string |
| jwtPublicKey | Public key to verify the signature of the challengeToken |
-------------------------------------------- | string |
| logoShow | Displays the header with the logo if set to true | true | true or false |
| closeButtonShow | Displays the close button if set to true | true | true or false |
| instructionsShow | Displays the instructions view if set to true | true | true or false |
| reviewShow | Displays the review view if set to true | false | true or false |
| selectCamera | Chooses which camera to use in the flow | front | front or back |
| detectionTimeout | Time in ms before the capture stops and the SDK shuts down | 300000 | 60000 to 300000 |
| helpModalShow | Displays the help button in capture views if set to true | true | true or false |
| captureHeadingShow | Displays the heading texts in capture views if set to true | true | true or false |
Validation¶
The SDK internally validates the configuration received, following this process:
- Those properties not inserted in the config will take the default values.
- Each filled property will have its type validated.
- Each filled property will be compared to allowed values.
If these checks fail, the SDK finishes through onSelfieCaptureFinished(error) with a SelfieCaptureError whose error is configuration.
language¶
By default, the SDK loads the default texts in the device language if it is English (en) or Spanish (es), and falls back to English otherwise. You can also set a fixed language (en or es).
"setup": {
"language": "es"
}
uiOrientation¶
This setting forces the selfie capture flow to run in the selected orientation.
If the option is set to landscape, the SDK will only work in landscape mode.
"setup": {
"uiOrientation": "landscape"
}
liveness¶
This parameter specifies whether the process is passive or active:
passive: selfie capture flow.active: head movement challenge flow.
active requires challengeToken.
"setup": {
"liveness": "active"
}
challengeToken¶
Required in active liveness mode. It defines the movement challenge sequence.
"setup": {
"challengeToken": "your-jwt-token"
}
jwtPublicKey¶
Public key used to verify the signature of the challengeToken, so the movements it asks for cannot have been altered. It is an EC P-521 key in PEM (SPKI) format, encoded in base64; once decoded it reads -----BEGIN PUBLIC KEY-----.... The token is expected to be signed with ES512.
"setup": {
"jwtPublicKey": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0K..."
}
- Provided and the signature is valid: the process continues.
- Provided and the signature is not valid: the process stops, the
VD_invalidChallengeSignatureevent is emitted and the SDK finishes with theinvalidChallengeSignatureerror. - Not provided: the signature is not verified, the process continues and the
VD_jwtPublicKeyNotFoundinfo event is emitted.
logoShow¶
Show or hide the header logo on all screens.
"setup": {
"logoShow": false
}
| Default Configuration | Custom Configuration |
|---|---|
![]() |
![]() |
closeButtonShow¶
Show or hide the close button globally.
"setup": {
"closeButtonShow": false
}
| Default Configuration | Custom Configuration |
|---|---|
![]() |
![]() |
instructionsShow¶
Enable or disable tutorial/instructions before capture.
"setup": {
"instructionsShow": false
}
| Screen | Mobile |
|---|---|
| Instructions Passive | ![]() |
| Instructions Active | ![]() |
reviewShow¶
Enable or disable review screen (passive flow only).
"setup": {
"reviewShow": true
}
| Screen | Mobile |
|---|---|
| Review | ![]() |
selectCamera¶
Default is front camera. back should be used only in exceptional assisted scenarios.
Note: in active mode, back is not valid.
"setup": {
"selectCamera": "front"
}
detectionTimeout¶
Defines how long (in milliseconds) the SDK waits before stopping and finishing the process.
Accepted range: 60,000 to 300,000 ms.
"setup": {
"detectionTimeout": 70000
}
helpModalShow¶
Show or hide help button in capture screens.
"setup": {
"helpModalShow": false
}
| Default Configuration | Custom Configuration |
|---|---|
![]() |
![]() |
captureHeadingShow¶
Show or hide heading texts in capture screens.
"setup": {
"captureHeadingShow": false
}
| Screen | Mobile |
|---|---|
| Capture Passive | ![]() |
| Capture Active | ![]() |










