
Official C++ SDK for Authon — Software Licensing & Authentication Platform
Website • Docs • Discord • Status
- Windows (uses WinHTTP)
- C++17 or later
- Link with:
winhttp.lib(MSVC) or-lwinhttp(MinGW)
Single header — just copy authon.h into your project:
#include "authon.h"MSVC (Visual Studio):
cl /EHsc /O2 example.cpp winhttp.libMinGW:
g++ -O2 -o example.exe example.cpp -lwinhttp#include "authon.h"
int main() {
authon::Authon auth("your-app-id", "your-api-key");
if (!auth.init()) {
printf("Connection failed\n");
return 1;
}
if (auth.login("username", "password")) {
printf("Level: %d\n", auth.level);
printf("Expires: %s\n", auth.expiresAt.c_str());
} else {
printf("Error: %s\n", auth.lastError.c_str());
}
auth.logout();
return 0;
}if (auth.login("user", "pass")) {
// auth.level, auth.subscription, auth.expiresAt, auth.sessionToken
}if (auth.license("XXXXX-XXXXX-XXXXX-XXXXX")) {
printf("Valid! Level: %d\n", auth.level);
}if (auth.registerUser("newuser", "password", "LICENSE-KEY")) {
printf("Account created!\n");
}// Variables
std::string val = auth.getVar("key");
auth.setVar("key", "value");
std::string uvar = auth.getUserVar("key");
// File download (raw bytes)
auto data = auth.downloadFile("file-id");
// data is std::vector<unsigned char>
// Activity log
auth.log("User opened application");
// Session check
bool valid = auth.check();
// Logout
auth.logout();Auto-generated from system hardware. Override:
auth.login("user", "pass", "custom-hwid");- 🌐 Website: https://authon.pro
- 📖 Docs: https://authon.pro/docs
- 💬 Discord: https://discord.gg/MTY79JDFm6
- 📊 Status: https://authon.pro/status
- 🔗 API Health: https://api.authon.pro/health
MIT