checkIDVUserBiometricTemplateStatus

🔍 Overview

The checkIDVUserBiometricTemplateStatus API is used to determine whether a user's biometric template is already stored on the REL-ID server.
It helps developers decide whether to initiate the biometric opt-in workflow or proceed with biometric-based authentication.

The corresponding event onIDVCheckUserBiometricTemplateStatus provides the result of this check.


🖥️ Recommended Screen

The app should display a loading or biometric status check screen while the API call is being processed.
Once the event is received:

  • If the template is present: Navigate user to biometric features or allow opt-out.
  • If the template is absent: Prompt user to opt in for biometric enrollment.

🔁 API to Check Biometric Template

✳️ checkIDVUserBiometricTemplateStatus

Initiates the check for a stored biometric template on the server.

🧠 React Native
RdnaClient.checkIDVUserBiometricTemplateStatus((response) => {});
🐦 Flutter
rdna.checkIDVUserBiometricTemplateStatus();
🌐 Cordova
com.uniken.rdnaplugin.RdnaClient.checkIDVUserBiometricTemplateStatus(successCallback, errorCallback);
📱 Native iOS
(RDNAError *)checkIDVUserBiometricTemplateStatus;
🤖 Native Android
RDNA.RDNAError checkIDVUserBiometricTemplateStatus();

🎯 Event: onIDVCheckUserBiometricTemplateStatus

Triggered as a result of checkIDVUserBiometricTemplateStatus.
Returns user's biometric template status in a structured payload.

🧾 Sample Payload

{
  "userID": "user123",
  "idvResponse": "{"status_code":100,"status_message":"Template is present","result":true}",
  "status": {
    "statusCode": 100,
    "statusMessage": "Template is present"
  },
  "error": {
    "longErrorCode": 0,
    "shortErrorCode": 0,
    "errorString": "Success"
  }
}

🧷 Field Descriptions

FieldTypeDescription
userIDstringUnique user ID
idvResponsestringJSON string containing template status
statusobjectSDK status code and message
errorobjectError object with short/long codes and message

📊 idvResponse Value Breakdown

status_codestatus_messageresultInterpretation
100Template is presenttrueTemplate exists
600Template does not existfalseNo template found
400Unable to process requestServer or validation failure
500Liveness check failedLiveness/anti-spoofing issue

📲 Code Snippets for Event Handling

🧠 React Native
const onIDVCheckUserBiometricTemplateStatus = (response: any) => {
  const result = JSON.parse(response.idvResponse).result;
  if (result) {
    // Template exists
  } else {
    // Prompt biometric opt-in
  }
};
🐦 Flutter
onIDVCheckUserBiometricTemplateStatus(dynamic response) {
  final parsed = jsonDecode(response['idvResponse']);
  if (parsed['result']) {
    // Template present
  } else {
    // No template
  }
}
🌐 Cordova
document.addEventListener('onIDVCheckUserBiometricTemplateStatus', function(response) {
  const result = JSON.parse(response.idvResponse).result;
  // Act based on result
});
📱 Native iOS
- (void)onIDVCheckUserBiometricTemplateStatus:(NSString *)userID 
                                 idvResponse:(NSString *)idvResponse 
                                     status:(RDNARequestStatus *)status 
                                      error:(RDNAError *)error {
    NSData *data = [idvResponse dataUsingEncoding:NSUTF8StringEncoding];
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
    BOOL result = [json[@"result"] boolValue];
}
🤖 Native Android
void onIDVCheckUserBiometricTemplateStatus(String userID, String idvResponse, RDNARequestStatus status, RDNA.RDNAError error) {
    try {
        JSONObject obj = new JSONObject(idvResponse);
        boolean result = obj.getBoolean("result");
    } catch (JSONException e) {
        e.printStackTrace();
    }
}

🚫 Error Codes and Developer Action

CodeMessageDeveloper Action
100Template is presentProceed to authentication or opt-out
600Template not foundTrigger biometric opt-in flow
400Request could not be parsedShow retry or contact support
500Liveness check failedPrompt retry or switch to fallback auth

✅ Developer Response Flow

OutcomeSuggested Developer Action
Template PresentOffer biometric services or manage settings
No TemplateTrigger initiateIDVBiometricOptIn()
ErrorShow error UI and offer retry

🔁 Next API to Call Based on Outcome

Event OutcomeSuggested Follow-up API
result = false (no template)initiateIDVBiometricOptIn()
result = true (template exists)Proceed to initiateIDVServerBiometricAuthentication() or settings
ErrorRetry or fallback authentication