BlinkID as a client-side SDK
We generally recommend using the Verify SDK as a client-side SDK for the Verify API.
However, in certain cases, some of our clients find it necessary to use BlinkID instead.
This can be the case if:
- You already have a BlinkID integration in your app, and aren't able to add or migrate to the Verify SDK
- You need a solution for the web platform, where the Verify SDK is not currently available
If the first case resonates with you, we'd still advise migrating to the Verify SDK because it's a superset of BlinkID and is able to return extraction results. In addition to that, all of the extra stuff the Verify SDK does on-device will result in cleaner captures, more accurate extraction, and better user outcomes.
As for the web platform, we're currently hard at work on getting the Verify SDK there. In the meantime, BlinkID is the best solution.
Never modify the captured images in any way. Prefer using the multipart endpoint (because it has lower latency), but if you must, encoding the images to base64 is ok.
Do not use lossy compression on the images. Since the raw images matrices are huge, and you likely don't want the latency hit, it's best to encode the images to lossless PNGs.
Downsides
Using BlinkID is probably the second best option after the Verify SDK, but it will have some downsides. BlinkID is optimized for extraction (specifically on-device extraction), and not every image that's acceptable for extraction will be suitable for verification (verifiable).
That means that sometimes, images that are captured by BlinkID will not be processed by the Verify backend - resulting in Retry or Undeterminable RecommendedOutcomes.
Compatibility
It's critical to use the correct version of BlinkID for each version of the Verify API. Using mismatched versions will result in more frequent refusals to process by the Verify SDK. In addition, if the API contains a newer version of the pipeline, the client side BlinkID may not be able to process the documents supported on the backend you want processed.
If you're just using cloud, then you should use the latest version of BlinkID.
Here's a table of matching versions:
| Verify API | BlinkID SDK |
|---|---|
| 3.18.x | 7.6.x |
| 3.17.x | 7.6.x |
| 3.16.x | 7.4.x |
| 3.15.x | 7.4.x |
| 3.14.x | 7.4.x |
| 3.13.x | 7.3.x |
| 3.12.x | 7.1.x |
| 3.11.x | 6.13.x |
| 3.10.x | 6.13.x |
| 3.9.x | 6.13.x |
| 3.8.x | 6.13.x |
| 3.7.x | 6.12.x |
| 3.6.x | 6.11.x |
| 3.5.x | 6.10.x |
| 3.4.x | 6.9.x |
| 3.3.x | 6.9.x |
| 3.2.x | 6.8.x |
| 3.1.x | 6.8.x |
| 3.0.x | 6.7.x |
| 2.7.x | 6.6.x |
| 2.6.x | 6.6.x |
| 2.5.x | 6.5.x |
| 2.4.x | 6.5.x |
| 2.3.x | 6.3.x |
| 2.3.4 | 6.3.x |
| 2.3.x | 6.2.x |
Image return with BlinkID SDK
The BlinkID SDK does not have image return enabled by default since it increases memory consumption. It is necessary, then, to enable image return and convert the native image format to a base64 string or upload it to an accessible cloud storage or CDN.
Here's a snippet on how the SDK can be configured for image return:
- JS
- Swift
- Java
function init() {
const blinkId = document.querySelector("blinkid-in-browser");
blinkId.recognizerOptions = {
'BlinkIdMultiSideRecognizer': {
'saveCameraFrames': true
}
}
}
@IBAction func didTapScan(_ sender: AnyObject) {
/** Create BlinkID recognizer */
self.blinkIdRecognizer = MBBlinkIdMultiSideRecognizer()
self.blinkIdRecognizer?.saveCameraFrames = true
/** Create overlay settings and continue with intialization process */
let settings: MBBlinkIdOverlaySettings = MBBlinkIdOverlaySettings()
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
parent = findViewById(android.R.id.content);
// setup recognizer and put it into recognizer bundle
BlinkIdMultiSideRecognizer recognizer = new BlinkIdMultiSideRecognizer();
recognizer.setSaveCameraFrames(true);
// continue creating the recognizer bundler and initializing
recognizerBundle = new RecognizerBundle(recognizer);
}
The BlinkID SDK can return cropped images with the returnFullDocumentImage property/setting, however, cropped and post-processed images will result in failures on the back-end. BlinkID Verify requires the integrity of the original camera frame be retained with the surrounding context for an accurate verdict.
Handling the SDK result
Once a successful scan is achieved, a native image object for the respective platform will be included for the result's frontCameraFrame, backCameraFrame, and barcodeCameraFrame properties.
These native image formats will need to be converted to a base64 string or uploaded to an accessible URL where the API can download the images.
Even if documents in your region don't contain a barcode, we still recommend mapping the barcodeCameraFrame SDK result to imageBarcode API parameter and passing an empty string for cases where the barcodeCameraFrame object is empty.