Get IDV Configurations

API: getIDVConfig

📌 Overview

The getIDVConfig API is used to fetch the current IDV configurations from the REL-ID Gateway server. These configurations govern how the IDV SDK behaves during document scanning and selfie capture.


📤 Response

The API returns a JSON object containing two top-level keys:

  • error: A standard RDNAError JSON object with shortErrorCode, longErrorCode, and errorString.
  • response: A JSON object with current IDV configuration values.

Sample Response:

{
  "error": {
    "longErrorCode": 0,
    "shortErrorCode": 0,
    "errorString": "Success"
  },
  "response": {
    "selectedDatabaseId": "India",
    "databaseDetail": [
      { "id": "India", "description": "India", "status": 0 },
      { "id": "Jordan", "description": "Jordan", "status": 0 },
      { "id": "FullDB", "description": "FullDB", "status": 0 }
    ],
    "nfcScanEnabled": true,
    "nfcScanTimeOut": 30,
    "authenticityChecksEnabled": true,
    "hologramCheckEnabled": true,
    "saveDebugLogs": false,
    "saveCroppedImages": true,
    "version": "3.0",
    "supportedVersions": ["3.0"],
    "isRawDataRequired": false,
    "useDefaultDatabase": true
  }
}

📝 Field Descriptions

FieldTypeDescription
selectedDatabaseIdstringCurrently selected database
databaseDetailarrayList of available databases with id, description, status
nfcScanEnabledbooleanEnables NFC scanning for supported documents
nfcScanTimeOutintTimeout value for NFC scan (recommended 20-60)
authenticityChecksEnabledbooleanEnable or disable document authenticity checks
hologramCheckEnabledbooleanEnable or disable hologram checking
saveDebugLogsbooleanSave debug logs to sandbox
saveCroppedImagesbooleanSave cropped document images locally
versionstringCurrent config version (e.g., "3.0")
supportedVersionsarrayList of supported config versions
isRawDataRequiredbooleanEnable raw data sharing from SDK to app
useDefaultDatabasebooleanUse default bundled database or download via setIDVDatabaseID

🧪 Notes

  • Use this configuration to dynamically control the behavior of document scanning and selfie capture.
  • The configuration can be updated using the setIDVConfig API.

Code Snippets for getIDVConfig

React Native
RdnaClient.getIDVConfig((response) => {
  if (response.error.shortErrorCode === 0) {
    console.log('Config:', response.response);
  } else {
    console.error('Error fetching config:', response.error.errorString);
  }
});
Flutter
rdna.getIDVConfig().then((response) {
  if (response['error']['shortErrorCode'] == 0) {
    print('Config: ${response['response']}');
  } else {
    print('Error: ${response['error']['errorString']}');
  }
});
Cordova
com.uniken.rdnaplugin.RdnaClient.getIDVConfig(
  function(response) {
    if (response.error.shortErrorCode === 0) {
      console.log('Config:', response.response);
    } else {
      console.error('Error:', response.error.errorString);
    }
  },
  function(error) {
    console.error('API call failed:', error);
  }
);
Native Android
String result = rdnaClient.getIDVConfig();
JSONObject json = new JSONObject(result);
JSONObject error = json.getJSONObject("error");
if (error.getInt("shortErrorCode") == 0) {
    JSONObject config = json.getJSONObject("response");
    Log.d("IDVConfig", config.toString());
} else {
    Log.e("IDVConfig", error.getString("errorString"));
}
Native iOS
NSString *result = [self.rdnaClient getIDVConfig];
NSData *data = [result dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSDictionary *error = json[@"error"];
if ([error[@"shortErrorCode"] intValue] == 0) {
    NSDictionary *config = json[@"response"];
    NSLog(@"Config: %@", config);
} else {
    NSLog(@"Error: %@", error[@"errorString"]);
}