Foliox License Docs

Go SDK

Drop-in source files for Go — copy them into your project. Nothing to install from a package registry.

Standard library only (Go 1.22+).

client, err := licenseclient.New(
    "https://license.foliox.sbs",
    "YOUR_PRODUCT_ID",                       // shown on the product's page in your dashboard
    "PASTE_PUBLIC_KEY_FROM_THE_DOCS",        // public - not a secret
)
if err != nil {
    log.Fatal(err) // unsafe or malformed configuration is reported here, before anything is sent
}

result := client.Check(licenseKey)
if result.Valid {
    fmt.Println("licensed, status:", result.Status, "expires:", result.ExpiresAt)
} else {
    fmt.Println("not licensed:", result.Reason)
}

Copy the licenseclient package into your own module (adjust the import path), or run go run ./example <key> here.

Options are functions passed to New: WithCachePath, WithTimeout, WithRetries, WithBackoff, WithDeadline, WithMaxResponseAge, WithHWID, WithInsecureLoopback, WithUserAgent. Also Verify (never activates), ClearCache, IsValidKeyFormat, ComputeHWID.

What it does for you

Offline grace is a resilience feature, not a security boundary. See the SDKs & API wrapper page in your server's docs for the full list, what no client library can do, and upgrade notes from v1.