# RequestTrialUser

## Request trial user license

## Requests a trial user license for a specific product

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

This endpoint requests for a new trial user to be created for the specified Domain and ProductCode. The AuthToken passed must be from the owner account for the specified domain.  TrialKey will automatically confirm the newly requested users email by sending them an email with their new login credentials consisting of the UserName provided via the API as well as a randomly generated sequence for their password. The email sent allows them to click a link to confirm their account, as well as a link to change their password if they wish to. A corresponding license is created for the ProductCode that was passed in this API when the user confirms their email. Emails are branded with your logo if you have uploaded it to your account profile.

Example URL:

/RequestTrialUser?AuthToken=a75774e6-7a4a-44d0-8fc7-9f51c293ea7d\&Domain=mydomain.com\&ProductCode=\<MY\_PRODUCT\_CODE>\&UserName=<myaddress@mydomain.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.                                                                         |
| ProductCode<mark style="color:red;">\*</mark> | String | The ProductCode from your TrialKey dashboard that identifies the product a license is being registered for.                    |
| UserName<mark style="color:red;">\*</mark>    | String | The email and username of the new user to create. Note that this username must be a valid email address or the call will fail. |

{% 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="404: Not Found Call failed, parameters missing or invalid, or UserName trial is expired" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Return Value:**  If the call succeeds then it will return an AuthToken identifier in the format `a75774e6-7a4a-44d0-8fc7-9f51c293ea7d` which can be used with other API calls.  If the user not already exist, then it will be created.  Once the users has confirmed their account via email, a trial license for the ProductCode will be created for the number of trial days that is specified in the Product as specified in the dashboard.

&#x20;

The call will fail with a 404 HTTP status code if any of the required parameters are missing or invalid.  The call will also fail with a 404 if the UserName passed in already has a trial that has expired.
{% 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/requesttrialuser.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.
