# CreateLicenseKeyEx

### Description

Creates a computer-bound license key.

```csharp
string CreateLicenseKeyEx (ELicenseType licenseType, string machineID)
```

### Arguments

| Name        |                                   Data Type                                   | Description                                                                                                                                                                                                                                                                                                                                      |
| ----------- | :---------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| licenseType | [ELicenseType](/docs/api-reference/.net-api/qlmlicense/enums/elicensetype.md) | Specify the type of license to generate.                                                                                                                                                                                                                                                                                                         |
| machineID   |                                     string                                    | A unique identifier for the machine. If you specify a ComputerName as the LicenseType, this argument must be the Computer Name. If you specify User Defined as the LicenseType, this argument can be anything you want. When validating the license key in your code, you will need to provide the same value to the ValidateLicenseEx function. |

### Return

| Type   | Description                  |
| ------ | ---------------------------- |
| string | a computer-bound license key |

## Remarks

Before calling this function, you must call DefineProduct and set the PrivateKey property. Note that including the PrivateKey in your code is not recommended. Creation of license keys should never be done from within the application but rather from a server that the user does not have access to.


---

# 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.soraco.co/docs/api-reference/.net-api/qlmlicense/client-side-methods/createlicensekeyex.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.
