# LicUnReg

## Unregister License

## Unregisters a license from TrialKey

<mark style="color:blue;">`GET`</mark> `https://signup.trialkey.ca/api/v2/LicUnReg`

This endpoint allows a registered license for your application to be unregistered. Once unregistered, this license can be re-registered and consumed by the user. This functionality can be used for licenses that are locked to a particular machine name.

Example URL:

/LicUnReg?AuthToken=\<AUTH\_TOKEN>\&InstallKey=\&Domain=mywebsite.com

#### Query Parameters

| Name                                         | Type   | Description                                                                                        |
| -------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------- |
| Domain<mark style="color:red;">\*</mark>     | String | Your account domain (i.e. the mywebsite.com part of [www.mywebsite.com](http://www.mywebsite.com)) |
| AuthToken<mark style="color:red;">\*</mark>  | String | The AuthToken acquired from calling the DoLogin() API.                                             |
| InstallKey<mark style="color:red;">\*</mark> | String | Unique license identifier of an already installed license.                                         |

{% tabs %}
{% tab title="200 Call succeeded, user is authenticated and AuthToken returned" %}

```javascript
{
    "name"="Wilson",
    "owner": {
        "id": "sha7891bikojbkreuy",
        "name": "Samuel Passet",
    "species": "Dog",}
    "breed": "Golden Retriever",
}
```

{% endtab %}

{% tab title="401 User not authenticated or error" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Return Value:**  If any of the required parameters are missing, the call will fail with a 404 HTTP status code.  If the InstallKey refers to a license that is an expired trial, then the call will fail with a 404 HTTP status code.  If the InstallKey cannot be found, then text of `Not valid` will be returned with a `RetCode` of **4010** and a `RetCodeDesc` of `License not valid`.

&#x20;

If the call succeeds, it will return the string `Valid` with a `RetCode` of **3010** and a `RetCodeDesc` of `License has been unregistered`.  Additionally, when this call succeeds, the UnInstall Count in the dashboard will be incremented to show how many times in total this license has been uninstalled.

&#x20;

user is successfully authenticated, then the call returns a string that represents an authentication token (referred to as an AuthToken) in the format `a75774e6-7a4a-44d0-8fc7-9f51c293ea7d`.  This token can be subsequently used in other calls to check the license etc.  This AuthToken is also set as a cookie called `AuthToken` and is also returned as a custom header called `AuthToken`.
{% 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://trialkey.gitbook.io/docs/trialkey-licensing/reference/api-reference/licunreg.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.
