Guides
License keys in every language
Working code for validating keys, limiting devices, checking licenses offline and delivering updates, for each language and framework we support.
Blender add-ons
- Validate a license key in a Blender add-onCheck a Clavem license from a Blender add-on without Python threads, using urllib in a timer or a separate process, and respect the online access setting.
- Verify an Ed25519 license token offline in a Blender add-onBlender ships no Ed25519 library. Verify Clavem's sgt1 token with a short pure-Python verifier or with wheels bundled in the manifest, and check the claims.
C#
- How to validate a license key in a C# or .NET appValidate a Clavem license key from C# with a shared HttpClient and System.Text.Json, protect it with DPAPI, and handle 404, 429, 503 and timeouts correctly.
- License activation and deactivation in a C# or .NET appActivate a Clavem license from C# with a hashed MachineGuid fingerprint, bind snake_case replies with JsonNamingPolicy, handle the device limit, and free the seat.
- Software update checks and downloads in a C# or .NET appCheck Clavem's releases endpoint from C# with HttpClient, compare versions with NuGet.Versioning, resume a download with RangeHeaderValue, and start the installer.
- Verify a Clavem license token offline in C#Verify Clavem's Ed25519 license token in C# with NSec, since .NET has no Ed25519 in its base library, then check the claims with JsonDocument and a clock guard.
C++
- How to validate a license key in a C++ appValidate a Clavem license key from C++ with libcurl and nlohmann/json, store it in the Keychain or with DPAPI, and handle 404, 429 and 503 without blocking.
- License activation and deactivation in a C++ appActivate a Clavem license from C++ with a SHA-256 hashed machine id from IOKit, the registry or machine-id, handle the activation limit, and free the seat.
- Software update checks and downloads in a C++ appCheck Clavem's releases endpoint from C++ with libcurl, compare semantic versions, resume a download with CURLOPT_RESUME_FROM_LARGE, and move the file into place.
- Verify a Clavem license token offline in C++Verify Clavem's Ed25519 license token in C++ with OpenSSL's EVP_DigestVerify, decode base64url without padding, and check the claims with test results.
Chrome extension
- How to validate a license key in a Chrome extensionValidate a Clavem license key from a Manifest V3 service worker with fetch, store it in chrome.storage.local, refresh it with chrome.alarms, and survive restarts.
- Verify a Clavem license token offline in a Chrome extensionVerify Clavem's Ed25519 license token inside a Manifest V3 service worker with a bundled copy of noble-ed25519, check the claims, and keep a clock-rollback guard.
Deno
- Activate and deactivate devices from a Deno appActivate a Clavem license from Deno with a hashed fingerprint that uses only permissions the user already granted, and handle the device limit.
- Check for updates and download builds from a Deno appCheck Clavem's releases endpoint from Deno once a day, compare versions with @std/semver, download with resume, and replace a deno compile executable safely.
- Validate a license key in a Deno app or compiled executableValidate a Clavem license key in Deno with fetch and the narrowest permission flags, store it safely, and fall back to the signed token offline.
- Verify an Ed25519 license token offline in DenoVerify Clavem's signed sgt1 license token in Deno with Web Crypto, no permission flags and one pinned standard-library import. Typed claims and tested vectors.
Electron
- How to validate a license key in an Electron appValidate a Clavem license key from Electron's main process with net.fetch, store it with safeStorage, share one check across windows, and handle 404, 429 and 503.
- License activation and deactivation in an Electron appActivate a Clavem license from Electron's main process with a salted node-machine-id fingerprint, handle the activation limit, and free a seat on request.
- Software update checks and downloads in an Electron appCheck Clavem's releases endpoint from Electron with net.fetch, compare versions with semver, resume a download, show taskbar progress, and open the installer.
- Verify a Clavem license token offline in ElectronVerify Clavem's Ed25519 license token in Electron's main process with node:crypto and a JWK public key, with test results, a rollback guard and ASAR integrity.
Figma plugin
- How to validate a license key in a Figma pluginValidate a Clavem license key from a Figma plugin with fetch, allow clavem.io in the manifest, store it in figma.clientStorage, and key seats to the Figma user.
- Verify a Clavem license token offline in a Figma pluginVerify Clavem's Ed25519 license token in a Figma plugin's main thread with noble-ed25519 and noble-hashes, no WebCrypto needed, and tie the token to the Figma user.
Flutter
- Activate and deactivate devices from a Flutter appActivate a license key once per device from Flutter, send a stable hashed fingerprint, handle the activation limit, and free the seat when a customer moves.
- Check for updates and download builds from a Flutter appCheck Clavem's releases endpoint from a Flutter desktop app, compare versions with pub_semver, fetch the link on click, and resume interrupted downloads.
- Validate a license key in a Flutter appCheck a license key from Flutter with package:http and secure storage. One validate call at launch, an 8-second timeout, and what to do on 404, 429 and 503.
- Verify an Ed25519 license token offline in FlutterVerify Clavem's signed sgt1 license token in Dart with the cryptography package, check the claims, and test it with tokens you sign yourself.
Go
- How to validate a license key in a Go appValidate a Clavem license key from Go with net/http and context, decode replies into typed structs, store the key with go-keyring, and handle 404, 429 and 503.
- License activation and deactivation in a Go appActivate a Clavem license from Go with machineid.ProtectedID as the fingerprint, decode the limit error with typed structs, and free the seat with deactivate.
- Software update checks and downloads in a Go programCheck Clavem's releases endpoint from Go, compare versions with golang.org/x/mod/semver, resume a download with Range, and replace the binary with go-update.
- Verify a Clavem license token offline in GoVerify Clavem's Ed25519 license token in Go with the standard library's crypto/ed25519 and base64.RawURLEncoding, with a reason for each refusal and a clock guard.
Godot
- Activate and deactivate devices from a Godot gameActivate a license once per device from Godot 4 with a hashed OS.get_unique_id() fingerprint, handle the limit, and cope with Web builds and drifting ids.
- Check for updates and download builds from a Godot gameCheck Clavem's releases endpoint from Godot 4 with HTTPRequest, compare your project version, stream the download to disk, and verify a patch .pck.
- Validate a license key in a Godot 4 gameValidate a license key from Godot 4 with an HTTPRequest node and await, read the status and Retry-After header, and store the license in user://.
- Verify an Ed25519 license token offline in GodotGodot's Crypto class only does RSA, so Clavem's Ed25519 token needs C# with BouncyCastle or a native plug-in. The options, the code, and a fallback.
Java
- How to validate a license key in a Java appValidate a Clavem license key from Java 17 with java.net.http.HttpClient and Jackson, store it in the system keyring, and handle 404, 429, 503 and timeouts.
- License activation and deactivation in a Java appActivate a Clavem license from Java with a SHA-256 hashed hardware UUID from OSHI, handle the device limit with Jackson, and free the seat on request.
- Software update checks and downloads in a Java appCheck Clavem's releases endpoint from Java with HttpClient and Jackson, compare semantic versions, resume a download with Range, and move the file atomically.
- Verify a Clavem license token offline in JavaVerify Clavem's Ed25519 license token in Java 15 or later with java.security.Signature by wrapping the raw public key in an X.509 prefix, then check the claims.
JetBrains plugins
- Validate a license key in a JetBrains IDE pluginValidate a Clavem license in a Kotlin IDE plugin with the key in PasswordSafe, non-roaming state, java.net.http off the EDT and the signed token as a fallback.
- Verify an Ed25519 license token offline in a JetBrains pluginVerify Clavem's sgt1 token in a Kotlin IDE plugin with the JDK's built-in Ed25519, check the claims, and find out if your target IDEs need a library.
JUCE
- Activate and deactivate devices from a JUCE pluginActivate a Clavem license from JUCE with a hashed SystemStats device id. One seat covers every plugin format; handle the device limit off the message thread.
- Check for updates and download installers from a JUCE pluginCheck Clavem's latest-release endpoint from JUCE with juce::URL, compare versions, fetch a signed installer link, and handle hosts that keep the plugin loaded.
- Validate a license key in a JUCE audio plugin or standalone appValidate a Clavem license key from JUCE with juce::URL on a background thread. One check per process, nothing on the audio thread, and a token fallback offline.
- Verify an Ed25519 license token offline in a JUCE pluginVerify Clavem's signed sgt1 token in JUCE with Monocypher, juce::Base64 and juce::JSON. CMake setup, the exact claim checks, and a tested result table.
Kotlin
- Activate and deactivate devices from a Kotlin appActivate a Clavem license from Kotlin with a hashed ANDROID_ID or install id, handle the device limit, and free seats when a phone is replaced or reset.
- Check for updates and download builds from a Kotlin appCheck Clavem's releases endpoint from Kotlin, compare versions with SemVer rules, and download signed links with DownloadManager on Android.
- Validate a license key in a Kotlin app on Android or the JVMValidate a Clavem license key from Kotlin with OkHttp and coroutines, keep it out of Android Auto Backup, and fall back to the signed token offline.
- Verify an Ed25519 license token offline in KotlinVerify Clavem's signed sgt1 license token in Kotlin with the JDK's Ed25519 on the desktop and BouncyCastle on Android. Claims, checks and tested vectors.
Node.js
- Activate and deactivate devices from a Node.js appActivate a Clavem license from Node.js with a hashed machine fingerprint, handle the device limit, and keep containers and CI from using up seats.
- Check for updates and download builds from a Node.js appCheck Clavem's releases endpoint from Node.js once a day, compare versions with semver, and download the signed link on demand with resume support.
- Validate a license key in a Node.js app or CLI toolCall Clavem's validate endpoint from Node.js with the built-in fetch, store the key safely, and fall back to the signed token when offline or rate limited.
- Verify an Ed25519 license token offline in Node.jsVerify Clavem's signed sgt1 license token in Node.js with node:crypto and no dependencies. Tested against valid, tampered, stale and wrong-product tokens.
Obsidian plugins
- Validate a license key in an Obsidian pluginCall Clavem's License API from an Obsidian plugin with requestUrl, keep the key in SecretStorage, and give each device its own seat. Covers 4xx and timeouts.
- Verify an Ed25519 license token offline in an Obsidian pluginVerify Clavem's sgt1 token in an Obsidian plugin with Web Crypto and an @noble/curves fallback for older builds, using no Node APIs so mobile works too.
PHP
- Activate and deactivate installs from a self-hosted PHP appDecide what counts as a device in a self-hosted PHP product, send a stable fingerprint, handle the activation limit, and free the seat when a site moves.
- Check for updates and install a release from a self-hosted PHP appCall Clavem's releases endpoint from PHP, compare versions with version_compare, and install a ZIP with a rollback folder. Zip-slip safe, tested against a mock.
- Validate a license key in a self-hosted PHP appCheck a Clavem license from PHP with cURL, cache the answer for a day, back off on 429 and 503, and fall back to the signed token. Tested on PHP 7.4 and 8.3.
- Verify a Clavem license token offline in PHP with sodiumVerify the sgt1 Ed25519 license token in PHP with ext-sodium or sodium_compat, check its claims, and avoid the string-versus-int trap. Run on PHP 7.4 and 8.3.
Python
- How to validate a license key in a Python appValidate a Clavem license key from Python with the standard library, store it with keyring, and handle 404, 429, 503 and timeouts without blocking the app.
- License activation and deactivation in a Python appActivate a Clavem license from Python with a hashed machine id read per platform, why uuid.getnode is wrong for it, and how to handle the device limit.
- Software update checks and downloads in a Python appCheck Clavem's releases endpoint from Python with urllib, compare versions with packaging, resume a download with Range, and replace the file atomically.
- Verify a Clavem license token offline in PythonVerify Clavem's Ed25519 license token in Python with PyNaCl or cryptography, check the claims with a reason for each refusal, and guard against a set-back clock.
Qt
- How to validate a license key in a Qt 6 appValidate a Clavem license key from Qt with QNetworkAccessManager, signals and QJsonDocument, store it with QtKeychain, and handle 404, 429 and 503 without blocking.
- License activation and deactivation in a Qt appActivate a Clavem license from Qt using QSysInfo::machineUniqueId hashed with QCryptographicHash, handle the device limit, and free the seat when a customer moves.
- Software update checks and downloads in a Qt appCheck Clavem's releases endpoint from Qt with QNetworkAccessManager, compare versions with QVersionNumber, resume a download with Range, and open the installer.
- Verify a Clavem license token offline in a Qt appVerify Clavem's Ed25519 license token in Qt with libsodium's crypto_sign_verify_detached, decode base64url with QByteArray, and check the claims with QJsonDocument.
Raycast extensions
- Validate a license key in a Raycast extensionRead the key from a password preference, activate on the first run, validate at most daily, and keep state in LocalStorage with the signed token as a fallback.
- Verify an Ed25519 license token offline in a Raycast extensionVerify Clavem's sgt1 token in a Raycast extension with node:crypto and a JWK public key, check the claims, and keep the token in LocalStorage. Tested in Node.
Rust
- How to validate a license key in a Rust appValidate a Clavem license key from Rust with ureq, map every status code to an outcome enum, store the key with the keyring crate, and handle 429 and 503.
- License activation and deactivation in a Rust appActivate a Clavem license from Rust with a hashed machine-uid fingerprint, handle the device-limit error, and free the seat with a Drop guard in CI.
- Software update checks and downloads in a Rust appCall the Clavem releases endpoint from Rust with ureq, compare versions with the semver crate, resume a download, and swap the running binary with self-replace.
- Verify a Clavem license token offline in RustVerify a Clavem sgt1 token in Rust with ed25519-dalek's verify_strict, report why each token is refused, and guard against a set-back clock. With test results.
Swift
- How to validate a license key in a Swift appValidate a Clavem license key from Swift with URLSession and async/await, keep it in the Keychain, and handle 404, 429 and 503 without blocking launch.
- License activation and deactivation in a Swift macOS appActivate a Clavem license from Swift with a hashed hardware fingerprint, handle the activation-limit error, and free a seat when a customer changes Mac.
- Software update checks and downloads in a Swift macOS appCall the Clavem releases endpoint from Swift with the license key, compare versions, resume a download with Range, and open the DMG. Real results and limits.
- Verify a Clavem license token offline in SwiftCheck a Clavem sgt1 token in Swift with CryptoKit's Curve25519, apply the claim checks with a reason for each refusal, and guard against a clock set back.
Tauri
- How to validate a license key in a Tauri appKeep the Clavem license check in Tauri's Rust side with reqwest, send the webview only a state tag, and handle offline, 429 and 503 without blocking startup.
- License activation and deactivation in a Tauri appActivate a Clavem license from a Tauri command with a salted machine-uid fingerprint, show the webview a clear limit-reached state, and free the seat on request.
- Software update checks and downloads in a Tauri appCheck Clavem's releases endpoint from a Tauri command, stream the installer with progress events and Range resume, and open it. Why the updater plugin is separate.
- Verify a Clavem license token offline in a Tauri appVerify Clavem's Ed25519 license token in Tauri's Rust side, compile the public key into the build, and show the webview how many days are left offline.
Unity
- Activate and deactivate devices from a Unity gameActivate a license once per device from Unity with a salted deviceUniqueIdentifier hash, handle the activation limit, and know when that id changes.
- Check for updates and download builds from a Unity gameCheck Clavem's releases endpoint from Unity with UnityWebRequest, compare Application.version, fetch the link on click, and import .unitypackage updates.
- Validate a license key in a Unity game or toolValidate a license key from Unity with UnityWebRequest in a coroutine, read the JSON body on 404, 429 and 503, and keep scene loads from repeating the call.
- Verify an Ed25519 license token offline in UnityUnity has no built-in Ed25519. Add BouncyCastle, verify Clavem's sgt1 token, check the claims, and handle JsonUtility, IL2CPP and a clock set back.
Unreal Engine
- Activate and deactivate devices from an Unreal Engine gameActivate a Clavem license from Unreal C++ with a hashed login-id fingerprint, show the device-limit error, expose results to Blueprint, and free a seat.
- Check for updates and download builds from an Unreal Engine gameCheck Clavem's latest-release endpoint from Unreal C++, compare versions, fetch the signed download link on click, and stream a resumable file to disk.
- Validate a license key in an Unreal Engine game or appValidate a Clavem license key from Unreal C++ with FHttpModule. One POST from a GameInstance subsystem, handling for 404, 429 and 503, and an offline fallback.
- Verify an Ed25519 license token offline in Unreal EngineVerify Clavem's signed sgt1 token inside an Unreal C++ module with Monocypher, FBase64 and FJsonObject, with the exact claim checks and the Unreal traps.
VS Code extension
- How to validate a license key in a VS Code extensionValidate a Clavem license key from a VS Code extension with fetch and SecretStorage, hash env.machineId for the fingerprint, and gate commands with setContext.
- Verify a Clavem license token offline in a VS Code extensionVerify Clavem's Ed25519 license token in a VS Code extension with node:crypto on desktop and noble-ed25519 on the web, and bind it to this machine with fp.
Wails
- Activate and deactivate devices from a Wails appActivate a Clavem license from a Wails app in Go with a hashed machine ID, show the device-limit error, and free a seat from a button, not on quit.
- Check for updates and download builds from a Wails appCheck Clavem's latest-release endpoint from Go in a Wails app, compare versions with semver, resume downloads with progress events, and launch the installer.
- Validate a license key in a Wails desktop appValidate a Clavem license key from the Go side of a Wails app with net/http and the OS keychain. Handles 404, 429 and 503 and keeps the key out of the webview.
- Verify an Ed25519 license token offline in a Wails appVerify Clavem's sgt1 token in Go with crypto/ed25519 and RawURLEncoding. No dependencies, the exact claim checks, and the key-length panic to avoid.
WordPress plugin
- How to validate a license key in a WordPress pluginValidate a Clavem license key from a WordPress plugin with wp_remote_post, refresh it from WP-Cron instead of on every page, and detect cloned staging sites.
- Verify a Clavem license token offline in a WordPress pluginVerify Clavem's Ed25519 license token in PHP with sodium_crypto_sign_verify_detached, store a valid-until time so page views do no crypto, and guard the clock.