# Hardware ID

Both LicenseAPI and LicenseManager use the Hardware ID module to calculate a unique fingerprint for the local machine. The module provides multiple methods of determining the ID:

```typescript
export enum HardwareIdAlgorithm {
  Default = 0,
  WindowsHardwareFingerprintId = 1,
  WindowsComputerSystemProductId = 2,
  WindowsCryptographyId = 3,
  LinuxMachineId = 4,
  CloudPlatformsId = 5,
};
```

The default method (0) covers all cases and fallbacks. If you override the default method, the method used should be consistent across your project. For both LicenseAPI and LicenseManager, this can be overridden globally by setting the required value in the config object when initializing the LicenseAPI/LicenseManager, e.g.:

{% code title="example.js" %}

```javascript
const licenseAPI = new LicenseAPI({
  apiKey: '12345678-4bfe-4e3a-8737-757004d6294c',
  sharedKey: 'eYuHrlajvIVTiSFIXpxpKhw78f4Ewy-00-12345678',
  appName: 'js-sdk-test-1',
  appVersion: '0.0.1',
  hardwareIDMethod: 5,
});
```

{% endcode %}

{% hint style="info" %}
Ensure the chosen hardware ID method is used consistently across your project (both LicenseAPI and LicenseManager) to avoid mismatches.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.licensespring.com/sdks/node.js-sdk/hardware-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
