Skip to main content

ID Bolt API Overview

ID Bolt is built around the concept of a session - a complete user journey from starting the ID scanning process to either successful completion or cancellation. The main class IdBoltSession represents this session and manages the entire workflow.

Quick Start Example

const idBoltSession = IdBoltSession.create(ID_BOLT_URL, {
licenseKey: LICENSE_KEY,
documentSelection: DocumentSelection.create({
accepted: [new Passport(Region.Any)]
}),
returnDataMode: ReturnDataMode.Full,
validation: [Validators.notExpired()],
onCompletion: (result) => {
console.log("Successfully completed workflow", result);
},
onCancellation: (reason) => {
console.log("Scanning cancelled", reason);
}
});
await idBoltSession.start();

Session Methods

Creating a Session

IdBoltSession.create(serviceUrl: string, options: IdBoltCreateSessionOptions): IdBoltSession

Creates a new ID Bolt session with your configuration. The session is not started until you call start().

Parameters:

note

The default value app.id-scanning.com is an alias that points to Scandit's servers. In a production environment it can be changed to your own domain name pointing to Scandit's servers. This will require you to configure a CNAME record in the DNS settings of your domain. Contact your Scandit account manager for more information.

Starting a Session

async session.start(): Promise<string>

Launches the ID Bolt user interface and begins the scanning workflow. Returns a unique session ID for tracking.

Resource Management

IdBoltSession.terminate(): void

When the keepAliveForNextSession (default: false) option is selected, this method can be used to clean up resources after the last session ended. If this option is not selected, there is no need to call this method.

Configuration Options

The following options can be configured when creating an ID Bolt session:

OptionTypeRequiredDescriptionDetails
licenseKeystringYesYour Scandit license key
documentSelectionDocumentSelectionYesDefines acceptable documentsDocument Selection
returnDataModeReturnDataModeYesControls what data is returnedData Handling
anonymizationModeAnonymizationModeNoControls data anonymizationData Handling
scannerScannerNoCustomizes scanner behaviorWorkflow Options
validationValidators[]NoValidators to verify IDValidators
localestringNoInterface languageSupported Locales
workflowWorkflowOptionsNoCustomizes workflow UIWorkflow Options
themeThemeNoCustomizes visual appearanceTheming
textOverridesTextOverridesNoCustomizes displayed textText Overrides
keepAliveForNextSessionbooleanNoKeeps resources for multiple sessionsAdvanced Options
onCompletionFunctionYesCompletion callbackCallbacks
onCancellationFunctionNoCancellation callbackCallbacks

Supported Locales

The following languages are supported:

  • en-US (English, United States - default)
  • de-DE (German, Germany)
  • de-CH (German, Switzerland)
  • es-ES (Spanish, Spain)
  • fr-FR (French, France)
  • it-IT (Italian, Italy)
  • nl-NL (Dutch, Netherlands)
  • pl-PL (Polish, Poland)
  • pt-PT (Portuguese, Portugal)
  • da-DK (Danish, Denmark)