> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-plus/built-in-functions/boxlanglicenseinfo.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-plus/built-in-functions/boxlanglicenseinfo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
