# LicCheck

## Check license validity

## Verifies a license

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

Example URL:

/LicCheck?AuthToken=\<AUTH\_TOKEN>\&Domain=mydomain.com\&InstallKey=\<INSTALL\_KEY\_VALUE>

This endpoint allows a license to be checked for validity. This call requires an AuthToken to have been obtained using the [DoLogin()](#verifies-credentials) API, which is then passed as a parameter in this call (see below).

#### 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 authentication token returned from the DoLogin() API call.                                                                                                                                                                    |
| InstallKey<mark style="color:red;">\*</mark> | String | The installation key to check for a valid license. This key is obtained when calling the LicReg() API call.hout having to store anything.                                                                                         |
| LockedToMachineName                          | String | *(Optional)* If this parameter is included in the call, then the system will match the machine name value passed against what was recorded as the licensed machine name when the LicReg() API was called to register the license. |

{% hint style="info" %}
**Return Value:**  If the call succeeds and the `InstallKey` passed was valid and has not expired, the call will return the text value `Valid` for a paid license, and the text value `Valid Trial` for a trial license, and a `RetCode` header with a **2001** value and a `RetCodeDesc` header with the expiry date.

If the `InstallKey` was not passed, the call will return a text value of `Insufficient data provided to perform the requested action`.  A `RetCode` of **4001** will also be returned along with a `RetCodeDesc` value of `Bad request,  insufficient data, InstallKey required`.

&#x20;

If the `InstallKey` was passed but was not valid, the call will return a text value of `Invalid`.  A `RetCode` of **4010** will also be returned along with a `RetCodeDesc` value of `License not valid`.

&#x20;

If the call succeeds and the `InstallKey` passed was *not valid* or has *expired*, the call will return the text value `Expired` for a paid license (`RetCode` **4011**, `RetCodeDesc` with the expiry date), and the text value `Expired Trial` for a trial license (`RetCode` **4011**, `RetCodeDesc` with the expiry date).
{% endhint %}
