Cryptlex Forums - Latest posts https://forums.cryptlex.com Latest posts Get how many licenses a user has in CPP Hi @AugustoMartins,

Thank you for reaching out.

The GetUserLicenses() function retrieves user licenses by making a network request to the server. Since the license count is not known prior to this call, you will need to allocate a buffer with a reasonable maximum size beforehand.

After a successful call, you can determine the actual number of licenses by iterating through the array and checking when the key field becomes empty. This indicates you have reached the end of valid licenses.

If the function returns LA_E_BUFFER_SIZE, your buffer was insufficient, and you should increase the size accordingly.

]]>
https://forums.cryptlex.com/t/get-how-many-licenses-a-user-has-in-cpp/2103#post_2 Mon, 16 Feb 2026 10:53:44 +0000 forums.cryptlex.com-post-5503
Get how many licenses a user has in CPP Some users may have more than one license associated to him, when my application call GetUserLicenses, I need to instantiate a UserLicense* with as many licenses as the user has, but I could not find a method in LexActivator library that gives me the number of licenses the user has so I can make the UserLicense* in the correct size. Is there a way to get the number of licenses from an user?

]]>
https://forums.cryptlex.com/t/get-how-many-licenses-a-user-has-in-cpp/2103#post_1 Sat, 14 Feb 2026 02:19:51 +0000 forums.cryptlex.com-post-5502
Activation Timestamps Thank you Anees for this information.

]]>
https://forums.cryptlex.com/t/activation-timestamps/2102#post_3 Fri, 13 Feb 2026 14:08:22 +0000 forums.cryptlex.com-post-5501
Activation Timestamps Dear @Helen,

Thank you for reaching out!

The time displayed on the Activations page in the Admin Portal is shown in your local timezone, based on the system from which you are viewing the portal. On the backend, all timestamps are stored in UTC, and the frontend automatically handles the conversion to your local timezone for display purposes.

]]>
https://forums.cryptlex.com/t/activation-timestamps/2102#post_2 Fri, 13 Feb 2026 05:43:57 +0000 forums.cryptlex.com-post-5500
Activation Timestamps Hi,

I just have a small question - on the Activations screen in the portal, when we click on an activation we can see the “Last Synched” time. Is this time in the local time of our computer (viewing the portal) or of the computer hosting the license server (it is in a different time zone to us).

Thanks very much.

Kind Regards,
Helen

]]>
https://forums.cryptlex.com/t/activation-timestamps/2102#post_1 Wed, 11 Feb 2026 12:12:24 +0000 forums.cryptlex.com-post-5499
Understanding how Allowed Activations works with node locked licenses Hi Pawel,

Thank you for reaching out.

Please refer to the following documentation link for relevant details: License Templates | Allowed Activations

For clarity, if allowedActivations of a license key is set to 2, the license can be activated on a maximum of 2 machines. If a third machine attempts activation, it will fail, and our SDK will return LA_E_ACTIVATION_LIMIT (error 58).

Node-locked by nature are permanently locked to the machine where they are activated. To free an activation seat, the license key must be deactivated on one of the existing machines. This can be done from the application by calling DeactivateLicense(), via the v3/activations/{id}/deactivate API endpoint, from the Activations page in the admin portal, or by the end user through the customer portal.

Once an activation slot is freed, the license can be activated on the new machine using the same license key.

]]>
https://forums.cryptlex.com/t/understanding-how-allowed-activations-works-with-node-locked-licenses/2098#post_2 Mon, 09 Feb 2026 08:14:30 +0000 forums.cryptlex.com-post-5498
Understanding how Allowed Activations works with node locked licenses Hey, I am trying to understand how Allowed Activations works with node locked licenses. The License Management app says “The number of simultaneous devices this license can be used on. -1 and 0 both represent an unlimited value”, but I cannot find this confirmed in the docs.

If I set this to 2, does that mean the license can be used concurrently on machine A and B? What happens if I try to use it on machine C? Will it be blocked automatically, or will it release machine A or B? If it is blocked, can I release it via the API on machine A or B to allow machine C?

]]>
https://forums.cryptlex.com/t/understanding-how-allowed-activations-works-with-node-locked-licenses/2098#post_1 Mon, 09 Feb 2026 06:39:47 +0000 forums.cryptlex.com-post-5494
Offline Activation API I will discuss it with our team and keep you posted soon.

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_9 Fri, 06 Feb 2026 10:51:40 +0000 forums.cryptlex.com-post-5491
Offline Activation API Hi Anees, thanks for the explanation.

From a technical/API-design perspective I can see two possible rationales for requiring licenseId:

  1. Cryptlex seems to generally model operations on stable resource identifiers (IDs) rather than alternate identifiers such as licenseKey (which is also consistent with other endpoints).
  2. In offline workflows it’s beneficial if the offline activation request artifact can be transported/shared without embedding the full license key (to reduce accidental leakage). In that case the response generator must already “know” which license to apply the request to, and a canonical licenseId is the natural handle.

That said, for the “service laptop / customer-side activation tool” scenario this still creates friction, because it forces an additional lookup step (key → id) and therefore either:

  • sharing licenseId alongside the licenseKey, or
  • granting the tool a way to resolve the ID.

Would you consider one of the following to support this pattern more cleanly?

  • Allow licenseKey as an alternative input (server resolves to licenseId internally), or
  • Provide a minimal “resolve license ID from license key” operation with scoped permissions (or a customer-portal-token compatible approach), so offline activation tools don’t need broader license read access.

Happy to align with your recommended best-practice pattern, but right now licenseId as a hard requirement makes the decoupled offline activation tooling noticeably harder to implement cleanly.

Best regards,
Dominik

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_8 Thu, 05 Feb 2026 19:40:07 +0000 forums.cryptlex.com-post-5488
Offline Activation API Hi Dominik,

The rationale behind requiring the licenseId for the CreateOfflineActivation endpoint is tied to how this flow is designed to be used. This endpoint is primarily invoked from the Admin Portal or Customer Portal, where the licenseId is already known.

When the same endpoint is used from another interface, it is assumed that the system performing the offline activation can access the license details using the licenseKey. This intent explains why this endpoint requires a licenseId rather than a licenseKey.

I hope this provides clarity.

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_7 Thu, 05 Feb 2026 18:55:23 +0000 forums.cryptlex.com-post-5487
Offline Activation API Hi Anees,

thanks for the clarification. I have one follow-up question regarding the API design.

For the CreateOfflineActivation endpoint, a licenseId is required, whereas for the online activation flow the licenseKey alone is sufficient.

In offline scenarios, where the activation is intentionally decoupled from the device and performed on a separate, connected system (e.g. a service engineer laptop or a customer backend), this creates an additional hurdle:

  • Either the licenseId has to be shared alongside the licenseKey, or
  • The offline activation tool needs an access token with license read permissions to resolve the licenseId from the licenseKey.

Both options somewhat weaken the otherwise clean separation between the offline device, the license key handed to the customer, and the activation tooling.

Could you share the rationale behind requiring licenseId for offline activation?
Are there recommended patterns to handle this securely and conveniently in air-gapped or customer-side activation workflows?

Thanks in advance,
Dominik

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_6 Wed, 04 Feb 2026 12:54:10 +0000 forums.cryptlex.com-post-5486
Offline Activation API Hi Dominik,

There are no specific permissions required for this endpoint. A valid access token is sufficient to use it.

Best regards,
Anees

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_5 Wed, 04 Feb 2026 11:05:26 +0000 forums.cryptlex.com-post-5485
Offline Activation API Hi Anees,

it looks like that authorization is necessary for this endpoint. Can you please comment on which permissions the access token needs to have to create an offline activation response?

Thanks,
Dominik

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_4 Wed, 04 Feb 2026 09:27:15 +0000 forums.cryptlex.com-post-5484
GetErrorMessage missing some codes Then please do not make internal functions public!

]]>
https://forums.cryptlex.com/t/geterrormessage-missing-some-codes/2092#post_5 Mon, 02 Feb 2026 13:03:10 +0000 forums.cryptlex.com-post-5482
GetErrorMessage missing some codes This is an internal function. Additionally, there are no error codes below 40, as values below this range represent status codes rather than error codes.

]]>
https://forums.cryptlex.com/t/geterrormessage-missing-some-codes/2092#post_4 Mon, 02 Feb 2026 12:23:10 +0000 forums.cryptlex.com-post-5481
GetErrorMessage missing some codes This is your code, isn’t it: https://github.com/cryptlex/lexactivator-dotnet/blob/f1b5949245ef652565b0b6b43785702c2f99bd83/src/Cryptlex.LexActivator/LexActivatorException.cs#L16

]]>
https://forums.cryptlex.com/t/geterrormessage-missing-some-codes/2092#post_3 Mon, 02 Feb 2026 08:07:53 +0000 forums.cryptlex.com-post-5480
GetErrorMessage missing some codes Hi,

Thank you for reaching out.

The GetErrorMessage function does not appear to be part of our SDK, as it does not pertain to any functionality we provide. Could you please clarify which specific function you are referring to, or share the relevant context or code snippet so that we can better assist?

]]>
https://forums.cryptlex.com/t/geterrormessage-missing-some-codes/2092#post_2 Mon, 02 Feb 2026 06:50:55 +0000 forums.cryptlex.com-post-5479
GetErrorMessage missing some codes In the C# library, the GetErrorMessage function does not handle error codes below 40. I would also have expected that function to be on the LexStatusCodes class, not the LexActivatorException.

]]>
https://forums.cryptlex.com/t/geterrormessage-missing-some-codes/2092#post_1 Fri, 30 Jan 2026 12:09:39 +0000 forums.cryptlex.com-post-5478
Offline Activation API Thanks. That solves my question

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_3 Fri, 23 Jan 2026 11:49:17 +0000 forums.cryptlex.com-post-5476
Offline Activation API Hi Dominik,

Yes, you can automate the offline activation workflow using the Create an Offline Activation API endpoint to generate the offline activation response.

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_2 Fri, 23 Jan 2026 11:32:35 +0000 forums.cryptlex.com-post-5475
Offline Activation API We are currently evaluating Cryptlex for our products and require node-locked offline activation.

Since our devices are not connected to the internet, we are looking for a way to make the offline activation flow as convenient as possible for users and service engineers.

One option would be a small internal tool running on a connected laptop (e.g. a service engineer laptop) that:

  • uploads the offline activation request generated by the device
  • downloads the corresponding offline activation response

From the documentation, it appears that creating an offline activation response is only possible via the admin portal or customer portal, and that this step is not exposed via the Web API.

Is this correct, or am I missing an API-based approach to automate the offline activation response generation?
Are there any recommended or supported alternatives for automating this workflow?

Thanks in advance,
Dominik

]]>
https://forums.cryptlex.com/t/offline-activation-api/2090#post_1 Fri, 23 Jan 2026 11:18:56 +0000 forums.cryptlex.com-post-5474
ActivateTrial() creates a new trial on the same machine Hi @Mingbo

As long as the machine fingerprint remains unchanged, calling ActivateLicense() again on the same machine will update the existing trial activation details, such as the expiration date, rather than creating a new trial activation.

Additionally, as previously communicated, a new function is planned in v5 that will just update the trial activation details, such as an extended expiry date. At this time, there is no confirmed ETA for its availability.

For any further assistance, please feel free to reach out to our support channel at [email protected].

Kind regards,
Anees

]]>
https://forums.cryptlex.com/t/activatetrial-creates-a-new-trial-on-the-same-machine/1706?page=2#post_25 Mon, 19 Jan 2026 10:16:41 +0000 forums.cryptlex.com-post-5471
ActivateTrial() creates a new trial on the same machine Hi @AneesKhan thanks for your reply. Am I correct that calling ActivateLicense() would potentially create a new trial activation as you mentioned above? Or it has been fixed in the C# sdk that would only update the new expiration date?

]]>
https://forums.cryptlex.com/t/activatetrial-creates-a-new-trial-on-the-same-machine/1706?page=2#post_24 Mon, 19 Jan 2026 09:00:08 +0000 forums.cryptlex.com-post-5470
ActivateTrial() creates a new trial on the same machine Dear @Mingbo,

After updating the Expiration Date of a trial activation on the server side, call the ActivateLicense() function on the client side to have the changes reflected locally.

Once done, you can call GetTrialExpiryDate() to retrieve the updated trial expiry date timestamp.

]]>
https://forums.cryptlex.com/t/activatetrial-creates-a-new-trial-on-the-same-machine/1706?page=2#post_23 Mon, 19 Jan 2026 08:42:30 +0000 forums.cryptlex.com-post-5469
ActivateTrial() creates a new trial on the same machine Hi @AneesKhan, just to confirm with you that after I updated the expiration data through the admin portal for a trial activation, what is the best way to sync the updated expiration data on the client side with C#? Is there a method for me to call to get the expiration date?

]]>
https://forums.cryptlex.com/t/activatetrial-creates-a-new-trial-on-the-same-machine/1706?page=2#post_22 Mon, 19 Jan 2026 07:24:23 +0000 forums.cryptlex.com-post-5468
ActivateTrial() creates a new trial on the same machine Thank you @AneesKhan for the update, I will let know you if I have any questions.

]]>
https://forums.cryptlex.com/t/activatetrial-creates-a-new-trial-on-the-same-machine/1706?page=2#post_21 Tue, 30 Dec 2025 04:29:31 +0000 forums.cryptlex.com-post-5467
ActivateTrial() creates a new trial on the same machine Hi @Mingbo,

The ability to directly update the expiresAt of a trial activation has now been added. For reference, here is the relevant endpoint: https://api.cryptlex.com/v3/trial-activations/{id}/expires-at. You can also update the expiration date through the admin portal by using the Actions menu of a trial activation.

If you need any further assistance, please contact us at [email protected] and we will be glad to help.

]]>
https://forums.cryptlex.com/t/activatetrial-creates-a-new-trial-on-the-same-machine/1706#post_20 Thu, 27 Nov 2025 08:44:14 +0000 forums.cryptlex.com-post-5465
How can I prevent users from exploiting the deactivation option in the user’s portal? Dear Logan,

Thank you for reaching out.

With longer sync intervals, the program will continue to run until the next serverSync occurs, even if the activation is deleted from the portal. This could potentially be misused, as the application will not immediately receive the updated license status.

To mitigate this, we recommend either:

  • Setting a short lease duration and server sync interval
    (or)
  • Setting a longer lease duration combined with a short serverSyncInterval

This ensures the application verifies its license status more frequently and reduces the risk of any unintended or unauthorized use.

]]>
https://forums.cryptlex.com/t/how-can-i-prevent-users-from-exploiting-the-deactivation-option-in-the-user-s-portal/2086#post_2 Fri, 14 Nov 2025 06:14:08 +0000 forums.cryptlex.com-post-5464
How can I prevent users from exploiting the deactivation option in the user’s portal? If a user has a hosted per-instance license and they delete the activation from the portal, will the program continue to be authorized until the sync interval? With longer sync intervals, could this be exploited to allow more instances than intended? If so, how can I prevent this?

]]>
https://forums.cryptlex.com/t/how-can-i-prevent-users-from-exploiting-the-deactivation-option-in-the-user-s-portal/2086#post_1 Thu, 13 Nov 2025 18:17:56 +0000 forums.cryptlex.com-post-5463
Cryptlex fails to write activation data Ok for future reference what was going on was that the user was using the App Store version of Resolve. When the plugin is run from inside that version of Resolve, the sandboxing rules are different. My workaround for the issue by checking whether we’re in the app store version of Resolve, and if so, then I set the data directory to somewhere that I can write to within the App store Resolve.app file. Basically I added this function:

void setCryptlexDataFolder() {
#ifdef __APPLE__
    // We can check from the HOME variable whether we are running from an app store app or not.
    const char* home = std::getenv("HOME");
    std::string home_str(home);
    if (home_str.find("Library/Containers") != std::string::npos) {
        // Running in an app store sandbox, need to set data folder
        std::string data_dir = home_str + "/Documents/iConf/";
        mkdir(data_dir.c_str(), 0755); // Create directory if it doesn't exist

        int status = SetDataDirectory(data_dir.c_str());
        log("Setting Cryptlex data directory to: %s", data_dir.c_str());
        if (LA_OK != status) {
            ShowDialog("App Store host detected. Failed to set Licensing data folder. Error: " + std::to_string(status));
        }
    } else {
        // Running as a regular app, just stick with default location.
    }
#endif
#ifdef _WIN32
// Do nothing, generally works by default
#endif
}

And I call it just before setProductData().

]]>
https://forums.cryptlex.com/t/cryptlex-fails-to-write-activation-data/2084#post_10 Sun, 02 Nov 2025 01:24:03 +0000 forums.cryptlex.com-post-5462
Cryptlex fails to write activation data Thank you Anees, I reached out to that email address and hopefully we’ll figure out what went wrong

]]>
https://forums.cryptlex.com/t/cryptlex-fails-to-write-activation-data/2084#post_9 Tue, 28 Oct 2025 19:47:09 +0000 forums.cryptlex.com-post-5461
Cryptlex fails to write activation data Hi,

Kindly reach out to our support channel via [email protected]. We may need to share a debug build to investigate the issue in more detail.

]]>
https://forums.cryptlex.com/t/cryptlex-fails-to-write-activation-data/2084#post_8 Tue, 28 Oct 2025 09:01:54 +0000 forums.cryptlex.com-post-5460
Cryptlex fails to write activation data Alternatively, if there’s a workaround that would allow us to write the activation data somewhere that we know we can write to, that’s another possible option here.

]]>
https://forums.cryptlex.com/t/cryptlex-fails-to-write-activation-data/2084#post_7 Tue, 28 Oct 2025 08:15:37 +0000 forums.cryptlex.com-post-5459
Cryptlex fails to write activation data It seems that the user has write access via terminal and was able to make the testfile there. I also have the hypothesis it might be some kind of permissions issue, but I’m having difficulty figuring out what that might be and how to diagnosis that. I’ve asked the user about the first three of these bullet points you mentioned so far.

The host is indeed installed and running from the /Applications folder, and this user only has one account on his machine.

In the top half of the below screenshot, you’ll see their permissions for their Library and Application Support directories given by ls -ld

I’ve also had them run the command you offered and that’s in the bottom half of the below screenshot.

Do let me know if there’s something we can use to diagnose the fourth option of there being some sort of unusual setting or third party software. I’m thinking it’s probably the most likely, if you think these permissions shown by ls look about right. The user does say they’re not aware of any antivirus software on their computer.

]]>
https://forums.cryptlex.com/t/cryptlex-fails-to-write-activation-data/2084#post_6 Tue, 28 Oct 2025 08:13:49 +0000 forums.cryptlex.com-post-5458