Appearance
Authentication Flow ​
The authentication process ensures each license key is valid and properly linked to its HWID (if applicable).
Basic Flow ​
- The user enters a license key (or username/password).
- Your app collects optional HWID information (if the license requires device binding).
- The SDK (or your HTTP client) sends a validation request to Keycrate.
- Keycrate responds with :
- success : true or false
- message : describes the successful validation of failed validation
- data : license data
- Your app handles the response accordingly.
Example (Node JavaScript) ​
javascript
import { configurate } from "keycrate";
const client = configurate("https://api.keycrate.dev", "your-app-id");
const response = await client.authenticate({
license: "XXXX-XXXX-XXXX",
});
if (response.success) {
console.log("License active:", response.message);
} else {
console.log("License invalid:", response.message);
}Handling Common Responses ​
| Response | Meaning | Example Handling |
|---|---|---|
success: true message : "LICENSE_VERIFIED_UNUSED_AND_LOCKED_KEY" | License is valid, First time userad and Hwid locked | Allow software access |
success : false message : "LICENSE_EXPIRED" | License duration ended | Show renewal message |
success: false message : "HWID_MISSMATCH" | Device HWID doesn't matched the stored license HWID | Ask user to reset HWID or contact support |
success : false message : "INVALID_USERNAME_OR_PASSWORD" | Wrong credentials | Prompt user to re-enter |
Authentication Methods ​
Keycrate supports two authentication methods:
License Key ​
javascript
// without HWID
await client.authenticate({ license: "your-license-key" });or
javascript
// with HWID
await client.authenticate({
license: "your-license-key",
hwid: "xxxxx_xxxxx_xxxxx",
});Username & Password ​
javascript
// without HWID
await client.authenticate({
username: "user@example.com",
password: "password123",
});or
javascript
// with HWID
await client.authenticate({
username: "user@example.com",
password: "password123",
hwid: "xxxxx_xxxxx_xxxxx",
});Next Steps ​
- Using an SDK? Choose your language: Python | JavaScript | Go | C# | Rust
- Implementing HTTP directly? See API Reference
- Need examples? Check out real-world use cases in the SDK documentation