Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›How to use

MobbScan Cordova/Ionic SDK

  • Getting started
  • Capacitor integration

How to use

  • Initialization
  • Scanning Documents
  • Face Matching
  • Video Conference
  • Customize UI
  • Optimize plugin

Help

  • Troubleshooting
  • Migration guides
  • Changelog

MobbScan Cordova: Face Matching

Introduction

MobbScan allows you to perform a face biometric matching between the user using the app and the picture on the ID document.

Once the document scan is completed, you need to call a new method MobbScanAPI.validateFace that will guide the user to capture their face biometrics to be able to match it against the document picture.

In the next section, the details of this method will be exposed.

MobbScanAPI.validateFace

This method opens the camera UI and starts the face matching process. The method has four parameters:

  • scanID: Identifier of the scan process provided by MobbScanAPI.startScanForDocumentType.

  • validationMode: Type of validation that will be performed, which could be one of the following values:

    • MobbScanFaceValidationMode.DEFAULT: Face recognition, without liveness checks.
    • MobbScanFaceValidationMode.LIVENESS_VIDEO_HEAD_MOVEMENT: Face recognition plus an extra check where users will be asked to perform some head movements to confirm that they are an actual person.
    • MobbScanFaceValidationMode.LIVENESS_VIDEO_PASSIVE: Face recognition with passive liveness check. This mode performs a face detection and records a video that is used to perform the facial validation in the server.


    Note If you want to get the recorded video, you must use the setVideoAcquisitorListener plugin method, which you can check at the end of this section.


  • validateFaceSuccess: Function which will be called when the face recognition finishes successfully. It will receive an object with the following attributes:

    • result: This could be "VALID" or "NOT_VALID".

    • scanId: Current scan ID.

    • resultData: Extra data about the validation result, it contains the follwing attributes:

      • face: Image of the captured face encoded in base64.
      • score: It is a score over 100 that represents the similarity between the face that appears in the document and the face detected by MobbScan. It can be used to establish your own threshold instead of relying on the result value.
      • livenessScore: Confidence value estimated in the liveness check process.
  • validateFaceFailure: Function which will be called when the face recognition fails for any reason. It will receive an object with the error that happened in the error attribute. That error includes an errorCode which identifies it.

MobbScanAPI.validateFaceOldInterface

Warning: We strongly recommend not to use this method, as this is a deprecated interface and it will be deleted in future versions.

From v2.21.0 developers can use this method in order to use the old oval facial detection interface. The method has four parameters:

  • scanID: Identifier of the scan process provided by MobbScanAPI.startScanForDocumentType.

  • validateFaceSuccess: This callback is managed the same way as the previous method.

  • validateFaceFailure: This callback is managed the same way as the previous method.

MobbScanAPI.detectFaceVideoLiveness

This methods allows the plugin to perform a facial detection with the MobbScanFaceValidationMode.LIVENESS_VIDEO_HEAD_MOVEMENT mode. This method is similar to the previous one, but with the difference that no facial matching is performed, only facial detection.

Here's an execution code sample:

MobbScanAPI.detectFaceVideoLiveness(MobbScanFaceValidationMode.LIVENESS_VIDEO_HEAD_MOVEMENT, validateFaceSuccess, validateFaceFailure);

If you need to obtain the recorded video, you should use the setVideoAcquisitorListener method to fetch it. Here is an execution example:

MobbScanAPI.setVideoAcquisitorListener(function(data) {
                console.log(data);
});

In this data object, you will obtain a temporary url of the video in the videoUrl property.

← Scanning DocumentsVideo Conference →
  • Introduction
  • MobbScanAPI.validateFace
  • MobbScanAPI.validateFaceOldInterface
  • MobbScanAPI.detectFaceVideoLiveness
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL