Get IDV Configurations

API: getIDVConfig

📘 Description

The getIDVConfig API is used to fetch the current IDV (Identity Verification) configurations for document scanning and verification processes within the REL-ID IDV SDK.

The getIDVConfig() API retrieves the complete set of IDV document scan configurations that are currently active for the REL-ID IDV SDK. These configurations control various aspects of the identity verification process, including document types, scanning parameters, validation rules, and verification thresholds.

The retrieved configurations can be modified using the companion setIDVConfig() API, allowing for dynamic adjustment of IDV behavior based on business requirements or regulatory compliance needs.


⚙️ Use Cases

  • Enable/disable document authenticity or hologram checks
  • Change default database behavior (local vs. server-fetched)
  • Adjust debugging or logging options for diagnostics

🧑‍💻 Method Signature

PlatformSignature
React NativeRdnaClient.getIDVConfig((response) => { }
Flutterrdna.getIDVConfig();
Cordovacom.uniken.rdnaplugin.RdnaClient.getIDVConfig(successCallback, errorCallback);
Native AndroidString getIDVConfig();
Native iOS(NSString *)getIDVConfig;

📤 Response Format

A standard RDNAError response indicating success or failure.

{
  "error": {
    "longErrorCode": 0,
    "shortErrorCode": 0,
    "errorString": "Success"
  },
  "response": {
    "version": "3.0",
    "saveDebugLogs": true,
    "nfcScanEnabled": true,
    "nfcScanTimeOut": 45,
    "isRawDataRequired": true,
    "saveCroppedImages": false,
    "supportedVersions": [
      "3.0"
    ],
    "useDefaultDatabase": true,
    "authenticityChecksConfig": {
      "hologram": true,
      "securityText": true,
      "barcodeFormat": true,
      "geometryCheck": true,
      "imagePatterns": true,
      "photoEmbedding": true,
      "blackAndWhiteCopy": true,
      "multipleLaserImage": true,
      "opticallyVariableInk": true,
      "electronicDeviceDetection": true,
      "dynaprint": false,
      "extendedMRZ": false,
      "extendedOCR": false,
      "invisiblePersonalInfo": false,
      "portraitComparison": false
    },
    "imageQualityChecksConfig": {
      "focus": false,
      "glare": false,
      "bounds": false,
      "colorness": false,
      "occlusion": true,
      "brightness": true,
      "resolution": true,
      "perspective": true,
      "portraitPresence": true,
      "screenCapture": true
    },
    "imageQualityThresholds": {
      "dpiThreshold": 200,
      "angleThreshold": 8,
      "brightnessThreshold": 80,
      "documentPositionIndent": 80,
      "maxGlaringPart": 0.1,
      "imgMarginPart": 0.07
    }
  }
}

📄 Code Snippets

React Native
// Get IDV Configuration
RelIDSDK.getIDVConfig((response) => {
  console.log("getIDVConfig Response: " + JSON.stringify(response));
  
  // Check for errors
  if (response.error.shortErrorCode === 0) {
      // Success - process the IDV configuration
      const idvConfig = response.response;                
      
  } else {
      // Error occurred
      console.error("Error: " + response.error.errorString);
  }
});
Flutter
// Get IDV Configuration
RelIDSDK.getIDVConfig().then((response) {
print("getIDVConfig Response: $response");

// Check for errors
if (response['error']['shortErrorCode'] == 0) {
  // Success - process the IDV configuration
  Map<String, dynamic> idvConfig = response['response'];
  
} else {
  // Error occurred
  print("Error: ${response['error']['errorString']}");
}
}).catchError((error) {
print("API call failed: $error");
});
Cordova
// Get IDV Configuration
RelIDSDK.getIDVConfig(
  function(response) {
      console.log("getIDVConfig Response: " + JSON.stringify(response));
      
      // Check for errors
      if (response.error.shortErrorCode === 0) {
          // Success - process the IDV configuration
          var idvConfig = response.response;                       
          
      } else {
          // Error occurred
          console.error("Error: " + response.error.errorString);
      }
  },
  function(error) {
      console.error("API call failed: " + error);
  }
);
Native Android
// Get IDV Configuration
RelIDSDK.getIDVConfig(new IDVConfigCallback() {
  @Override
  public void onSuccess(IDVConfigResponse response) {
      Log.d("RelIDSDK", "getIDVConfig Response: " + response.toString());
      
      // Check for errors
      if (response.getError().getShortErrorCode() == 0) {
          // Success - process the IDV configuration
          IDVConfigData idvConfig = response.getResponse();            
          
      } else {
          // Error occurred
          Log.e("RelIDSDK", "Error: " + response.getError().getErrorString());
      }
  }
  
  @Override
  public void onFailure(Exception error) {
      Log.e("RelIDSDK", "API call failed: " + error.getMessage());
  }
});
Native iOS (Objective-C)
NSDictionary *config = @{
  @"selectedDatabaseId": @"India",
  @"nfcScanEnabled": @YES,
  @"hologramCheckEnabled": @YES,
  @"saveDebugLogs": @NO,
  @"saveCroppedImages": @YES
};

NSData *jsonData = [NSJSONSerialization dataWithJSONObject:config options:0 error:nil];
NSString *configJson = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];

RDNAError *result = [self.rdnaClient setIDVConfig:configJson];
if (result.shortErrorCode == 0) {
  NSLog(@"Configuration updated.");
} else {
  NSLog(@"Error: %@", result.errorString);
}