Dev Center
Table of contents

License Control

The library provides flexible licensing options with the support of the following APIs

Deprecated APIs:

license

An online license or an offline license can be set here. Most license formats are supported. Dynamsoft usually provides an online license.

license needs to be set before createInstance() or loadWasm().

static license: string

Code Snippet

Dynamsoft.DBR.BarcodeReader.license =
  "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING";
let scanner = await Dynamsoft.DBR.BarcodeReader.createInstance();

For convenience, you can even set license in the script tag.

<script src="/dist/dbr.js" data-license=
  "YOUR-ORGANIZATION-ID or YOUR-HANDSHAKECODE or AN-OFFLINE-LICENSE or ANY-OTHER-TYPE-OF-SUPPORTED-LICENSE-STRING"></script>

Note:

Handshake Code and Organization ID

When you are using the online licenses, the license items can’t be used directly. You need to use either a “Handshake Code” or an “Organization ID” instead.

The “Handshake Code” refers to an array of license items. When an “Handshake Code” is set, these license items will be consumed in a preset order.

When an “Organization ID” is set, the default “Handshake Code” of the “Organization ID” will be used.

Generally, the first “Handshake Code” ever created for an organization is the default one. However, you can always configure another “Handshake Code” as the default.

“Handshake Codes” can be configured in the customer portal.

licenseServer

Specifies the URL(s) for the main and stand-by License Tracking Server(s). This is only required when you host the License Tracking Server(s) yourself. If nothing is set, the Server(s) hosted by Dynamsoft will be used.

static licenseServer: string[] | string

Code Snippet

// You can specify only the main server
Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-DLS"];

//or you can specify both
Dynamsoft.DBR.BarcodeReader.licenseServer = ["YOUR-OWN-MAIN-DLS", "YOUR-OWN-STANDBY-DLS"];

sessionPassword

Specifies a password to protect the Handshake Code. If no Handshake Code is specified with the API handshakeCode, this password protects the default Handshake Code.

The password can be set for each Handshake Code when it was first created and can be changed later by editing the configuration of the Code.

static sessionPassword: string

Code Snippet

Dynamsoft.DBR.BarcodeReader.sessionPassword = "YOUR-SESSION-PASSWORD";

deviceFriendlyName

static deviceFriendlyName: string

Sets a human-readable name that identifies the device. This name will appear in the device details table when you check the statistics of the according Handshake Code or License Item.

Code Snippet

Dynamsoft.DBR.BarcodeReader.deviceFriendlyName = "Harry-Potter-iPhone";

organizationID

Please NOTE that this API is deprecated! Use license instead.

When a license is purchased, it is registered to an Organization. This license is then hosted by a License Tracking Server which authorizes terminal devices and consumes the license. This API specifies which Organization you would like to acquire authorization from.

static organizationID: string

Code Snippet

Dynamsoft.DBR.BarcodeReader.organizationID = "YOUR-ORGANIZATION-ID";

handshakeCode

Please NOTE that this API is deprecated! Use license instead.

Licenses registered to the same Organization are grouped by Handshake Codes. When an Organization is specified by organizationID, the default Handshake Code will be used unless another Code is specified with this API.

Generally, the first Handshake Code ever created for an organization is the default one. However, you can always make another Code default in the customer portal.

static handshakeCode: string

Code Snippet

Dynamsoft.DBR.BarcodeReader.handshakeCode = "YOUR-HANDSHAKE-CODE";

productKeys

Please NOTE that this API is deprecated! Use license instead.

A product key is an alphanumeric string used as an offline license. If such a key is specified in your program, you do not need to specify anything else for licensing purposes.

static productKeys: string

Code Snippet

Dynamsoft.DBR.BarcodeReader.productKeys = "YOUR-PRODUCT-KEYS";

For convenience, you can even set productKeys in the script tag.

<script src="/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 8.8.7

  • Latest version(10.2.10)
  • Version 10.x
    • Version 10.0.21
    • Version 10.0.20
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.33
    • Version 9.6.32
    • Version 9.6.31
    • Version 9.6.30
    • Version 9.6.21
    • Version 9.6.20
    • Version 9.6.11
    • Version 9.6.10
    • Version 9.6.2
    • Version 9.6.1
    • Version 9.6.0
    • Version 9.3.1
    • Version 9.3.0
    • Version 9.2.13
    • Version 9.2.12
    • Version 9.2.11
    • Version 9.0.2
    • Version 9.0.1
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.7
    • Version 8.8.5
    • Version 8.8.3
    • Version 8.8.0
    • Version 8.6.3
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.5
    • Version 8.2.3
    • Version 8.2.1
    • Version 8.2.0
    • Version 8.1.3
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +