Biometric API Specification V2 20
Biometric API Specification V2 20
Biometric
Integration
Version 2.20
Purpose of document
Purpose of this document is to provide MORPHO API to perform Biometric Operation using
MORPHO Sensor for e-KYC.
Scope
Following are the in-scope & Out of Scope items
In-Scope
- Capturing fingerprint biometric through MSO 1300 devices
Supported Browsers
Internet Explorer
Chrome
Safari
Opera
Signature CaptureFingerprint()
Description This function simply captures the finger.
Timeout and Finger Index will be passed as parameters with url, separated by ’?’
from url
For Example: xmlhttp.open("POST",url+"?"+timeout+"$"+fingerindex,true);
url = "https://localhost:8000/ CaptureFingerprint "
Signature CompareTemplates()
Description It compares the current template with the already captured templates and returns
Matching result.
For Example:
xmlhttp.open ("POST", url+"?"+templates Array+"$"+template+"$"+
numberOfTemplates,true);
url = "https://localhost:8000/CompareTemplates“
Input templates Array – List of templates already captured(maximum 10 templates)
template – Current template to be matched with templates array.
numberOfTemplates – number of templates stored in templates array.
Signature readCertificate()
Description For Aadhaar Related Services, User must call this API first to fetch the public key and
expiry date internally from the Public certificate given as input.
This will be used internally to encrypt the session key, session key encrypts the pid
data of biometric.
For Example: xmlhttp.open ("POST", url+"?"+ publicCertificateData, true)
url = "https://localhost:8000/readCertificate"
Input publicCertificateData in base64 encoded format
Output JSON Object have following
Return code – 0 in case of success otherwise possible error codes
Signature getURI(object)
Description This function returns encoded URI string for passed object.
It is just an utility function for javascript. It has no relation with given API.
Input JavaScript Object
Output Encoded URI String
Signature CaptureFingerprintForPid ()
Description
This function captures finger for the purpose of PID generation.
getPidDataWithFusion API will be called after this to get final PID data of captured
finger by this function.
For Example: xmlhttp.open("POST",url+"?"+timeout+"$"+fingerindex,true);
url = "https://localhost:8000/captureFpForBfd"
For Example:
xmlhttp.open("POST",url+"?"+timeout+"$"+fingerindex+"$"+imgFlag+"$"+isoFlag,true
);
url = "https://localhost:8000/ CaptureFingerprintwithISOFlag "
Input Timeout - Finger capture timeout in seconds
Fingerindex – Pass any value between 1 to 10 otherwise unknown will be considered
imgFlag – Value = 0 for Raw image, Value=2 for WSQ image
isoFlag – Value=0 for Image without ISO header, Value = 1 for image with ISO header
Output JSON Object have following
Return Code – 0 in case of success otherwise possible error codes.
- base 64 encoded template(ISO FMR) of captured finger.
- base 64 encoded(RAW Image) of captured finger.
- base 64 encoded(BMP Image)) of captured finger.
- NFIQ of captured finger.
Signature getPidDataWithFusion()
Description This function returns PID data with fusion
User must call clearTemplatesForPid API after this to clear the buffer
XML version(for example “1.0”) sent with url separated by ‘?’
For Example: xmlhttp.open("POST",url+"?"+XMLversion,true)
url = "https://localhost:8000/getPidDataWithFusion
Input XML version will be passed
Output JSON Object have following
- Return Code – 0 in case of success otherwise possible error codes.
- Encoded Encrypted PID Block of captured finger.
- Encoded Encrypted HMac.
- Encoded Encrypted Session Key.
- Certificate Expiry Date.
- Timestamp
Signature getPidDataWithOtp()
Description This function returns PID data with given OTP
XML version(for example “1.0”) sent with url separated by ‘?’
For Example: xmlhttp.open("POST",url+"?"+version+"$"+otp,true)
url = "https://localhost:8000/getPidDataWithOtp
Input XML version and OTP will be passed
Output JSON Object have following
- Return Code – 0 in case of success otherwise possible error codes.
- Encoded Encrypted PID Block of captured finger.
- Encoded Encrypted HMac.
- Encoded Encrypted Session Key.
- Certificate Expiry Date.
- Timestamp
Input XML version ,language code, and, Personal Identity(PI), Personal Address(
PA) or Personal Full Address(PFA) information will be passed.
Please refer UIDAI “aadhaar_authentication_api_1_6.pdf” for PI, PA and PFA fields.
Signature clearTemplatesForPid()
Description It clears PID data buffer.
For Example: xmlhttp.open("POST",url,true);
url = "https://localhost:8000/clearTemplatesForPid "
Input None
Output (JSON Object) prompts the successfully cleared buffer.
Signature captureFpForBfd()
Description
This function is used for BFD purpose .i.e user will get final BFD data (max 10
fingers) .
Once user captures final number of fingers, then to get Final BFD of captured
fingers, getBfdData API will be called after this.
For Example:
xmlhttp.open ("POST",url+"?"+timeout+"$"+fingerindex+"$"+imgFlag+"$"+isoFlag
,true);
url = "https://localhost:8000/captureFpForBfdwithISOFlag"
Input Timeout - Finger capture timeout in seconds
Fingerindex – Pass any value between 1 to 10 otherwise unknown will be considered
imgFlag – Value = 0 for Raw image, Value=2 for WSQ image
isoFlag – Value=0 for Image without ISO header, Value = 1 for image with ISO header
Output JSON Object have following
Return Code – 0 in case of success otherwise possible error codes.
- base 64 encoded template(ISO FMR) of captured finger.
- base 64 encoded(RAW Image) of captured finger.
- base 64 encoded(BMP Image)) of captured finger.
- NFIQ of captured finger.
Signature getBfdData ()
Description Once this function being called, final bfd data will be returned of captured fingers.
User must call clearTemplatesForBfd API after this to clear the buffer
Signature clearTemplatesForBfd()
Description For Example: xmlhttp.open("POST",url,true);
url = "https://localhost:8000/clearTemplatesForBfd"
Input None
Output (JSON Object) It clears BFD data buffer.
Description Code
Success 0
Biometrics device performed an internal error -1
Communication protocol error -2
Cannot connect biometrics device -3
Error while closing communication port -4
Invalid parameter -5
Not enough memory (in the PC) -6
Not enough memory for the creation of a database in the MSO -7
Authentication or Identification failed -8
MSO returned an unknown status error -9
The template is not valid -17
Command not yet implemented in this release -18
No response after defined time -19
Invalid imgFlag or isoFlag -20
There are too many templates -23
Templates with different formats are mixed -25
Command has been aborted -26
Invalid PK format -27
The user data are not valid -31
The Compression is not valid -38
Security error -39
The specified Morpho USB device is not plugged -42
A functionality has been requested, but is not available on the currently connected -72
device
Fingers’ Templates must be matched -101
Fingers’ Templates must not be duplicate -102
Environment: