Go SDK

Go license key system

The standard library already has Ed25519, so the Go client is small, fast and easy to audit — ideal for CLI tools and services you ship as a single binary.

License checking in a few lines

client, err := licenseclient.New(
    "https://license.foliox.sbs",
    "my-tool",
    publicKey, // from /api/v1/public-key
)
if err != nil {
    log.Fatal(err)
}

// activates on first run, verifies on every run after
result := client.Check(licenseKey)
if !result.Valid {
    log.Fatalf("not licensed: %s", result.Reason)
}

Get started

  1. Create a free account, add a product, and generate a key.
  2. Get the Go client and its full guide: Go SDK docs.
  3. Copy the public key from /api/v1/public-key into your app — the SDK uses it to verify every answer.
  4. Call check() with the customer’s key as shown above.

Why this SDK

  • Verifies signatures with crypto/ed25519 — no third-party crypto.
  • Great for single-binary CLI tools and daemons.
  • Returns clear reasons (expired, revoked, different device…) you can show to the user.

Prefer plain HTTP? See the licensing API and the API reference. Device locking works through a hashed machine ID — here’s how.

FAQ

Go licensing questions

How do I add license keys to a Go app?

Copy the Go client file into your project, create a product in your dashboard, generate keys, and call check() with the customer’s key when your app starts. The SDK activates the key on first run and verifies it after that.

What happens when the customer is offline?

The client caches the last signed “valid” answer and keeps your app running for up to 72 hours. Because the cache is signed, it can’t be edited by hand.

Is the SDK free?

Yes — all SDKs are included on every plan, including Free.

Ready to license your software?

Create a free account, generate your first keys and drop in an SDK — it takes a few minutes.