The scanthng.js SDK is a plugin to be used in combination with evrythng.js to allow easy access to the Identifier Recognition API. This allows JavaScript applications to use local images or image capture devices to lookup Platform resources when presented with a barcode or pre-specified image.



scanthng.js v3.1.0 is compatible with evrythng.js v4.7.2 and below.

scanthng.js v4.0.0 is compatible with evrythng.js v5.1.0 and above.

To learn more about implementing identification of codes associated with Platform Thngs and products, read Real-time Web Product Scanning.


Installation is similar to the evrythng.js SDK, but the library name is scanthng.js instead of evrythng. Note that installation of evrythng.js or evrythng-extended.js is required to use this plugin.

Including the library in an application and performing initialization is identical. However, because this is a plugin, make sure to apply it to the base SDK:


## Function Reference

All the functions available below should be used with an instance of an Application scope.

See the Identifier Recognition page for full details on params specified below, which are used to determine the type of scan performed.

.scan(params);  // Initiate image capture with params containing the filter

.scan(base64Data, params);  // Scan a pre-shot image converted to a Base64 string
  filter: { method: '2d', type: 'qr_code' },
.scanStream(params);  // Scan a barcode using a video stream from a device camera.
// Fast 2D QR code scanning
  filter: { method: '2d', type: 'qr_code' },
  // HTML element the video stream will be displayed within
  containerId: 'stream_container',

// Slower other barcode scanning, but still using video
  filter: { method: '2d', type: 'dm' },
  containerId: 'stream_container',
.identify(params);  // Read Thng/product linked to a predetermined Platform identifier value
  filter: { value: '', type: 'qr_code' }
.redirect(url);  // Redirect the browser to a URL, usually provided by an identification.
  filter: { method: '2d', type: 'qr_code' }
}).then((res) => {
  // Redirect to the specified URL

Additional Options

There are a set of additional options available to enhance the functionality of the scan. These should be included in the params alongside filter.

  • createAnonymousUser - Set to true to create an anonymous Application User to perform the scan.
  • perPage - Set to the desired maximum number of results per page.
  • imageConversion - Specify some conversion that should take place before the scan is performed.