If you're reading this, you probably just signed up for BetterAuth and are staring at an empty dashboard wondering what to do next. Good news — you'll have your first license key validated within the next 10 minutes. Let's walk through every step.
Step 1: Create Your Account
Head to betterauth.online/register and create your free account. The Basic tier gives you 3 application slots, 100 license keys per app, and 100 users per app — completely free, no credit card required. You'll receive a confirmation email (check spam if you don't see it within 60 seconds).
Step 2: Create Your First Application
Once logged in, click "New Application" on the dashboard. You'll need to provide:
- Application Name — This is visible to your users in the customer portal
- Version — Optional, but useful for tracking which version users are running (e.g.,
1.0.0)
After creation, you'll see your Application Secret. This is a 64-character hexadecimal string that authenticates API requests. Save it somewhere safe — it's only shown once. If you lose it, you'll need to regenerate it, which invalidates all existing integrations.
Step 3: Generate License Keys
Navigate to your application's License Keys tab and click "Generate Keys". You can specify:
- Duration — 1 day, 7 days, 30 days, or lifetime
- Level — Tier number (1–5) for feature gating
- Amount — How many keys to generate (up to 100 on Basic)
- Prefix — Custom prefix like
MYAPP-for branded keys
Keys are generated instantly in the format XXXX-XXXX-XXXX-XXXX. You can copy them individually or export all keys as a text file.
Step 4: Integrate the API
Now for the fun part — connecting your software to BetterAuth. Here's the minimal integration in C++:
#include <curl/curl.h>
#include <nlohmann/json.hpp>
#include <string>
std::string licenseKey = "XXXX-XXXX-XXXX-XXXX";
std::string appSecret = "your_64_char_secret";
// Initialize license check
std::string url = "https://betterauth.online/api/v2/license/validate";
std::string payload = "{\"key\":\"" + licenseKey + "\",\"secret\":\"" + appSecret + "\"}";
CURL* curl = curl_easy_init();
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload.c_str());
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
The API returns a JSON response:
{
"success": true,
"message": "License validated successfully",
"data": {
"username": "user123",
"expires": 1735689600,
"level": 1,
"hwid": "ABC123..."
}
}
Step 5: Add HWID Binding (Optional)
To prevent key sharing, enable HWID locking in your application settings. When a user first authenticates, BetterAuth captures a hardware fingerprint. Subsequent logins from different hardware are rejected. Your client code needs to send the HWID with each request:
{
"key": "XXXX-XXXX-XXXX-XXXX",
"secret": "your_app_secret",
"hwid": "captured_hardware_id"
}
Step 6: Monitor from the Dashboard
Your dashboard shows real-time analytics: active users, license usage, authentication logs, and geographic distribution. Set up webhooks to get notified on Discord or Telegram when events occur.
Troubleshooting Common Issues
- "Key not found" — Double-check the key format, no extra spaces or line breaks
- "HWID mismatch" — User changed hardware; use the HWID reset feature in the dashboard
- Timeout errors — Ensure your server allows outbound HTTPS to
betterauth.online
That's it. You now have a fully functional licensing system. For detailed API documentation covering every endpoint, check our API reference.