Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›How to use

MobbScan Capacitor

  • Getting started

How to use

  • Initialization
  • Onboarding process
  • Error handling
  • Validation criteria

Help

  • Changelog

Onboarding process

Introduction

To create a new onboading process it is necessary to obtain an onboarding token and a scanId.

NOTE: Contact the support team to obtain more information about it.

Start scan step

The first step after initializing the SDK is to create a new scanning process:

const onboardingToken = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

const scanId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

const successCallback = (scanId: string) => {
  console.log('✅ starting scanning');

  const documentSide = EDocumentSide.Front; // or EDocumentSide.Back
  this.#detectDocument(documentSide);
}

const errorCallback = (error: IMobbScanError) => {
  console.log('❌ starting scanning');
}

MobbScanAPI.startScan(onboardingToken, scanId, successCallback, errorCallback);

Detect document step

Next, the detection of each side of the document:

const baseUrl = 'https://gateway-{{ environment }}.mobbeel.com';

const successCallback = () => {
  console.log('✅ detecting document');
}

const errorCallback = () => {
  console.log('❌ detecting document');
}

MobbScanAPI.detectDocument({ value: side }, successCallback, errorCallback);

The document image is obtained as the result of the setScanDocumentImageCallback method:

const callback = (result: IDocumentDetectionResult) => {
  console.log("✅ setScanDocumentImageCallback", result);

  const { detectionReesult, documentSide, image } = result;

  if (detectionResult === "OK") {
    // 'OK' or 'PROCESS_CANCELLED' (if the user has cancelled the process)
    switch (documentSide) {
      case EDocumentSide.Back:
        const backDocumentImage = image;
        break;
      case EDocumentSide.Front:
        const frontDocumentImage = image;
        break;
    }
  }
};

MobbScanAPI.setScanDocumentImageCallback(callback);

Scan document step

Next, the capture and scanning of the document:

const scanId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

const successCallback = (result: string) => {
  console.log('✅ scanning document');
}

const errorCallback = (error: IMobbScanError) => {
  console.log('❌ scanning document');

  const { errorCode, errorDetails } = error;
}

MobbScanAPI.scanDocument(scanId, frontDocumentImage, backDocumentImage, successCallback, errorCallback);

The document extracted data is obtained as the result of the setScanDocumentDataCallback method:

const callback = (result: IDocumentResponseData) => {
  console.log("✅ setScanDocumentDataCallback", result);

  const { resultData } = result;
};

MobbScanAPI.setScanDocumentDataCallback(callback);

Validate face step

Next, the capture and validation of the face:

const scanId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

const faceValidationMode = EFaceValidationMode.LivenessVideoPassive;

const successCallback = (result: IFaceValidationResult) => {
  console.log('✅ scanning face');

  const { resultData } = result;
}

const errorCallback = (error: IMobbScanError) => {
  console.log('❌ scanning face');

  const { errorCode, errorDetails } = error;
}

MobbScanAPI.validateFace(scanId, { value: faceValidationMode }, successCallback, errorCallback);
← InitializationError handling →
  • Introduction
  • Start scan step
  • Detect document step
  • Scan document step
  • Validate face step
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2026 Mobbeel Solutions SL