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:

OptionTypeRequiredDescriptionDetailsSince
licenseKeystringYesYour Scandit license key1.0
documentSelectionDocumentSelectionYesDefines acceptable documentsDocument Selection1.0
returnDataModeReturnDataModeYesControls what data is returnedData Handling1.0
anonymizationModeAnonymizationModeNoControls data anonymizationData Handling1.3
anonymizedFieldsAnonymizedFieldsNoFine-grained control over which fields to anonymizeData Handling2.2
scannerScannerNoCustomizes scanner behaviorWorkflow Options1.2
validationValidators[]NoValidators to verify IDValidators1.0
localestringNoInterface languageSupported Locales1.1
workflowWorkflowOptionsNoCustomizes workflow UIWorkflow Options1.1
themeThemeNoCustomizes visual appearanceTheming1.1
textOverridesTextOverridesNoCustomizes displayed textText Overrides1.2
keepAliveForNextSessionbooleanNoKeeps resources for multiple sessionsAdvanced Options1.6
disableCloseOnBrowserBackbooleanNoPrevents closing on browser backAdvanced Options1.14
externalTransactionIdstringNoYour tracking ID for analyticsAdvanced Options1.17
learnMoreLearnMoreNoCustomize the "learn more" section2.0
onCompletionFunctionYesCompletion callbackCallbacks1.0
onCancellationFunctionNoCancellation callbackCallbacks1.0

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)