Skip to main content
Version: v8000

Quickstart

This guide takes you from zero to a working document scan in about five minutes. It uses the UX package, which gives you a complete camera scanning experience with the least code.

The steps are the same on every platform:

  1. Get a license key.
  2. Add the SDK to your project.
  3. Launch the scanner and read the result.

Get a license key​

  1. Go to the Microblink Developer Hub.
  2. Select BlinkID as the product.
  3. Select your platform.
  4. For web, set the domain to localhost while testing, or the domain where your app is hosted.

Keep the key somewhere your app can read it, such as an environment variable. Never commit a production key to source control.

Add the SDK​

Install the SDK and complete the platform-specific setup. The READMEs cover everything beyond the snippet below: required versions, repository configuration, and camera permissions.

Install the UX package:

npm install @microblink/blinkid

The scanning engine runs as a WASM module that must be served from your app, by default under /resources. See Host resources for the copy step and the bundler setup, and the web README for the full integration.

Scan a document​

Initialize the SDK with your license key and launch the scanner. When scanning finishes, you receive the extracted data in a callback.

import { createBlinkId } from "@microblink/blinkid";

const blinkId = await createBlinkId({
licenseKey: import.meta.env.VITE_LICENSE_KEY,
});

blinkId.addOnResultCallback((result) => {
console.log("First name:", result.firstName?.latin?.value);
console.log("Document number:", result.documentNumber?.latin?.value);
void blinkId.destroy();
});

createBlinkId loads the engine, opens the camera, and mounts the scanning UI in one call. Call destroy when you're done to release the camera and engine.

That's a complete, runnable integration. Point the camera at an identity document and the extracted fields print to your console.

Read the result​

The result is a structured object with a field for every piece of data BlinkID extracts: name, date of birth, document number, expiry date, address, and more. Each field also carries the location it was read from and the raw image.

For the full list of fields and their types, see the result reference.

note

On web, text fields expose values per script, so you read them as result.firstName?.latin?.value. On Android and iOS, the same field is result.firstName?.value.

Next steps​