Full integration tutorial — Ghotz Auth

This guide explains dashboard setup, files to add to your project, and functions to call so your app works with https://keyghotz.space/api/1.2/.

Part 1 — Dashboard setup (required)

  1. Register at keyghotz.space/register and verify your email.
  2. Manage Apps → create an application.
  3. Copy credentials from the language tab:
    • name — app name
    • ownerid — 10 characters
    • version — must match init() (e.g. 1.0)
  4. App Settings → Function Management — enable Login, Register, License as needed.
  5. Create keys on Licenses or use Store Auto-Key for your shop.

Part 2 — API URL (critical)

Point every client library to Ghotz, not any other host:

https://keyghotz.space/api/1.2/

See EXE, DLL, C#, Python for exact file edits.

Part 3 — Call order (all languages)

1. init()           ← REQUIRED first (sessionid)
2. check()          ← optional
3. ONE OF:
     register(user, pass, license_key)
     login(user, pass)
     license(license_key)
4. Run your program only if response.success == true

Part 4 — Choose your platform

Program typeGuideTypical use
Windows .exe (C++)C++ / EXE tutorialConsole or Win32 app
Injected DLL (C++)C++ DLL tutorialGame mod, overlay, cheat menu
C# / .NET / UnityC# tutorialWinForms, WPF, Unity
PythonPython tutorialScripts, tools
Website / PHPWebsite tutorialSeller panel, webhooks
Raw HTTPAPI referenceAny language

Part 4.1 — Simple working examples

Use these as a starter template. Replace APP_NAME, OWNER_ID, and 1.0 with your dashboard values.

Example A — C++ EXE (console)

#include <iostream>
#include "auth.hpp" // from docs/exe.php package

api KeyAuthApp("APP_NAME", "OWNER_ID", "1.0", "https://keyghotz.space/api/1.2/");

int main() {
    KeyAuthApp.init();
    if (!KeyAuthApp.response.success) {
        std::cout << "Init failed: " << KeyAuthApp.response.message << "\n";
        return 1;
    }

    std::string key;
    std::cout << "License key: ";
    std::getline(std::cin, key);
    KeyAuthApp.license(key);

    if (!KeyAuthApp.response.success) {
        std::cout << "Auth failed: " << KeyAuthApp.response.message << "\n";
        return 1;
    }

    std::cout << "Authenticated. Run protected code.\n";
    return 0;
}

Example B — C++ DLL (basic attach auth)

#include <Windows.h>
#include "auth.hpp" // from docs/dll.php package

api KeyAuthApp("APP_NAME", "OWNER_ID", "1.0", "https://keyghotz.space/api/1.2/");

DWORD WINAPI AuthThread(LPVOID) {
    KeyAuthApp.init();
    if (!KeyAuthApp.response.success) return 0;

    KeyAuthApp.license("TEST-KEY-HERE");
    if (!KeyAuthApp.response.success) return 0;

    // your hooked / overlay / feature code here
    return 0;
}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID) {
    if (reason == DLL_PROCESS_ATTACH) {
        DisableThreadLibraryCalls(hModule);
        CreateThread(nullptr, 0, AuthThread, nullptr, 0, nullptr);
    }
    return TRUE;
}

Example C — C# (.NET console / WinForms logic)

using KeyAuth;

var app = new api(
    name: "APP_NAME",
    ownerid: "OWNER_ID",
    secret: "", // keep empty on client
    version: "1.0"
);
app.init();
if (!app.response.success) return;

app.license("TEST-KEY-HERE");
if (!app.response.success) return;

Console.WriteLine("Authenticated. Continue app.");

Example D — Python (script)

import keyauth

app = keyauth.api(
    name="APP_NAME",
    ownerid="OWNER_ID",
    secret="",
    version="1.0",
    hash_to_check=""
)

app.init()
if not app.response["success"]:
    print("Init failed:", app.response["message"])
    raise SystemExit

app.license("TEST-KEY-HERE")
if not app.response["success"]:
    print("Auth failed:", app.response["message"])
    raise SystemExit

print("Authenticated. Continue app.")

Part 5 — Functions after init

FunctionUseEnable in dashboard
init()Always first
register() / regstr()New user + license keyRegister
login()Returning userLogin
license()Key onlyLicense
var() / getvar()Server variablesVars
log() / webhook()Logs & DiscordLog / Webhook

Part 6 — HWID

If HWID lock is enabled, the library sends hardware ID on auth calls. Use the built-in HWID from the SDK unless you have a custom stable ID.

Part 7 — Test checklist

  1. Create a test license in the dashboard.
  2. init() → must succeed.
  3. register() or license() → success.
  4. Restart app → login() → success.
Never put secret or sellerkey in an EXE/DLL. Only name, ownerid, version, and API URL belong in the client.

Part 8 — AI helper prompt for your users

Share this prompt with users so AI can help them add auth correctly in their project:

I am integrating Ghotz Auth in my project.

Use this API URL: https://keyghotz.space/api/1.2/
My app values:
- name: APP_NAME
- ownerid: OWNER_ID
- version: 1.0

Project type: [C++ EXE / C++ DLL / C# / Python]
Goal: add init + license/login/register flow with clear error messages.

Please return:
1) exact files to create/edit
2) full working code snippet
3) where to call init() first
4) where to block app execution if auth fails
5) short test checklist

Important:
- do NOT use seller secret in client
- keep auth checks before protected features
- code should be beginner-friendly

You can also ask AI: "Explain this like I am new, step-by-step, and show exactly where to paste each code block."

C++ EXE → DLL → C# → Python → API →