# BoxlangLicenseInfo

Retrieves the current BoxLang license status and information. This function returns details about the active license, including validity status, trial mode information, and license attributes.

## Method Signature

```
BoxlangLicenseInfo()
```

### Arguments

No arguments.

### Return Value

Returns a `STRUCT` with the following keys:

* `isValidLicense` (BOOLEAN) - Whether a valid license is currently active
* `isTrialMode` (BOOLEAN) - Whether the system is running in 60-day trial mode
* `email` (STRING) - Email address associated with the license (if activated)
* `serverType` (STRING) - Server environment type: `Production`, `Staging`, or `Development`
* `expirationDate` (STRING) - License expiration date in ISO format (if available)
* `licenseType` (STRING) - Type of license: `BoxLang+` or `BoxLang++`
* `message` (STRING) - Status message describing the current license state

## Examples

### Template Syntax

```js
// Check current license status
<bx:script>
    licenseInfo = boxlangLicenseInfo();

    if ( licenseInfo.isValidLicense ) {
        writeOutput( "✓ BoxLang+ License Active" );
        writeOutput( "Email: " & licenseInfo.email );
        writeOutput( "Server Type: " & licenseInfo.serverType );
        writeOutput( "Expires: " & licenseInfo.expirationDate );
    } else if ( licenseInfo.isTrialMode ) {
        writeOutput( "Currently in 60-day trial mode" );
    } else {
        writeOutput( "No valid license detected" );
    }
</bx:script>
```

### Script Syntax

```js
// Display detailed license information
licenseInfo = boxlangLicenseInfo();

systemOutput( "=== BoxLang License Status ===" );
systemOutput( "Valid License: " & ( licenseInfo.isValidLicense ? "Yes" : "No" ) );
systemOutput( "Trial Mode: " & ( licenseInfo.isTrialMode ? "Yes" : "No" ) );

if ( licenseInfo.isValidLicense ) {
    systemOutput( "Email: " & licenseInfo.email );
    systemOutput( "Type: " & licenseInfo.licenseType );
    systemOutput( "Server: " & licenseInfo.serverType );
    systemOutput( "Expires: " & licenseInfo.expirationDate );
}
```

### Conditional Logic Example

```js
licenseInfo = boxlangLicenseInfo();

// Enable premium features based on license type
if ( licenseInfo.isValidLicense && licenseInfo.licenseType == "BoxLang++" ) {
    enableAdvancedFeatures = true;
    enablePDF = true;
    enableSpreadsheet = true;
} else if ( licenseInfo.isValidLicense && licenseInfo.licenseType == "BoxLang+" ) {
    enableAdvancedFeatures = true;
    enablePDF = false;
    enableSpreadsheet = true;
} else if ( licenseInfo.isTrialMode ) {
    systemOutput( "Trial mode - limited features available" );
} else {
    systemOutput( "Please activate a BoxLang license to continue" );
}
```

## Related

* [`BoxlangLicenseActivate()`](/boxlang-+-++/modules/bx-plus/built-in-functions/boxlanglicenseactivate.md) - Activate a new license with email and key
* [`BoxlangLicenseRefresh()`](/boxlang-+-++/modules/bx-plus/built-in-functions/boxlanglicenserefresh.md) - Refresh an existing license token


---

# 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://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-plus/built-in-functions/boxlanglicenseinfo.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.
