Offline license activation and file exchange
For a fully offline computer, use a request file and signed response for first activation. Carry the request by USB drive to an online computer.
Steps
- On the target computer, load SDK configuration, call OfflineRequest("activate") and save the request file. Creating it does not contact the server.
- On an online computer, open Offline file activation in the console, upload the request and download the response. End customers can also use their customer portal.
- Bring the response back and call ImportOffline with the original request and response. The SDK verifies signature, request ID, version and machine identity, then saves the cache.
- Use CheckFeature to check authorization. Offline computers do not need online heartbeats; the licensing policy determines the offline duration.
File activation supports only device-bound policies that allow offline use. Requests last 30 days. Timed licenses start when the server approves the request, since it cannot know when the response is imported.
How do I deactivate offline?
On the original computer, generate OfflineRequest("deactivate"). The SDK deletes its cache first; then submit the request to the vendor or customer portal. Deletion cannot prove no older copies exist. For prompt revocation, use policies requiring periodic online checks.
Names in each language
| Language | Generate request | Import response |
|---|---|---|
| Go | OfflineRequest("activate") → []byte | ImportOffline(requestBytes, responseBytes) |
| Java | offlineRequest("activate") → JSON text | importOffline(requestText, responseText) |
| JavaScript | offlineRequest("activate") → object | importOffline(requestObject, responseObject) |
| C | ln_offline_request(client, "activate") | ln_import_offline(client, requestText, responseText) |
| C++ / C# | OfflineRequest("activate") → JSON text | ImportOffline (text in C++, bytes in C#) |
| Python | offline_request("activate") → dict | import_offline(requestDict, responseDict) |
In C, free returned strings with ln_free_string. Pass the response file's actual contents, not the web API's outer data wrapper.