Skip to main content

Configuration

Initialisation options​

Set the options on a MobbScanConfiguration and pass it to initSdk:

const configuration = new MobbScanConfiguration();
configuration.isCancellationDialogEnabled = true;
configuration.isLightMode = true;

MobbScanAPI.initSdk(configuration, onSuccess, onError);
OptionDefaultDescription
isCancellationDialogEnabledtrueAsks the user for confirmation before leaving a capture with the back button
isLightModefalseUses ambient light with the front camera during face capture.

Environment​

Set the URL of your MobbScan environment after initSdk:

MobbScanAPI.setBaseURL('https://{SERVER-URL}', onSuccess, onError);

Callbacks​

Every method takes a success and an error callback. The error callback receives an IMobbScanError with errorCode and errorDetails. See Error handling.