C++ / EXE — manual setup (step by step)

This is the same layout used in production tools (ImGui + Win32 + Visual Studio). No KeyAuth library — only WinHTTP and your dashboard credentials.

Download C++ SDK (ZIP) Use AI instead (Cursor / ChatGPT)

Before you code — dashboard (5 minutes)

  1. Log in at keyghotz.space/appManage Apps → create or select your app.
  2. Copy name and ownerid (10 characters).
  3. App Settings → set version (e.g. 1.0) — must match your EXE exactly.
  4. Function Management → enable Login and/or License.
  5. Users → create a test user (username + password + subscription), or Licenses → create a key.
  6. Test API: open api/1.2/ping.php — you must see JSON, not an HTML page.

Step 1 — Download files (ZIP)

ghotz-cpp.zip contains every file. After unzip, read PROJECT_SETUP.txt in the folder.

Copy to your projectAdd in Visual Studio?What it does
include/ghotz_config.hNo (header only)Your name, ownerid, version, url
include/ghotz_auth.hNoghotz::Auth + GhotzAuth:: wrapper
src/ghotz_auth.cppYes — CompileWinHTTP client → POST /api/1.2/index.php
include/login_screen.hNoImGui login UI (optional)
src/login_screen.cppYes — CompileLogin button → GhotzAuth::Login / License
Your main.cpp / dllmain.cppAlready in projectCall GhotzAuth::Init() at start; main menu only if logged in

Step 2 — Write name, ownerid, version (when and how)

  1. In dashboard: Manage Apps → select app → copy name + ownerid.
  2. App Settings → copy version (e.g. 1.0).
  3. In ZIP: copy include/ghotz_config.h.exampleinclude/ghotz_config.h.
  4. Open ghotz_config.h and replace the four strings — save before building.
Field in ghotz_config.hWhere you get it in dashboardExample
name Manage Apps → your app card → Application name (not the secret) YOUR_APP_NAME
ownerid Same page → Owner ID (always 10 characters) XXXXXXXXXX
version App SettingsVersion — must be identical in code and dashboard 1.0
url Fixed for all apps (do not change unless self-hosting) https://keyghotz.space/api/1.2/

When to write this file: right after you create/select the app in the dashboard — before you build the EXE. Copy ghotz_config.h.exampleghotz_config.h, paste the four values, save, then add other SDK files.

Never put secret in the EXE (server/webhooks only).

#pragma once
namespace ghotz_config {
    inline const char* name    = "YOUR_APP_NAME";
    inline const char* ownerid = "XXXXXXXXXX";
    inline const char* version = "1.0";
    inline const char* url     = "https://keyghotz.space/api/1.2/";
}

Step 3 — Libraries to add to the project

LibraryRequired?How to add in Visual Studio
winhttp.lib Yes (auth HTTP) Project → Properties → Linker → Input → Additional Dependencies → add winhttp.lib
Or keep #pragma comment(lib, "winhttp.lib") at top of ghotz_auth.cpp (already there).
d3d11.lib / dxgi.lib Only if you use ImGui + DirectX11 Same Linker → Input (your overlay already may have these)
KeyAuth library_x64.lib No — remove it Ghotz uses WinHTTP only; delete old KeyAuth .lib from linker list

Step 4 — Visual Studio settings (commands / properties)

  1. C/C++ → General → Additional Include Directories: $(ProjectDir)include
  2. C/C++ → Language → C++ Language Standard: /std:c++17 or newer
  3. Linker → Input → Additional Dependencies: winhttp.lib (plus your D3D libs if ImGui)
  4. Platform: x64 (match your game/emulator)

Add .cpp files: right-click project → Add → Existing Item → pick src/ghotz_auth.cpp and src/login_screen.cpp.

Step 5 — #include lines (paste in your code)

// At top of dllmain.cpp, main.cpp, or login_screen.cpp:
#include "ghotz_config.h"   // name, ownerid, version, url (edit this file first)
#include "ghotz_auth.h"     // GhotzAuth::Init(), Login(), License()
#include "login_screen.h"   // optional ImGui UI

Step 6 — Connect login to API

// 1) When EXE / panel starts (once):
GhotzAuth::Init();
if (!GhotzAuth::InitSucceeded()) {
    // show GhotzAuth::LastError() on login screen — do not open main menu
}

// 2) Login button:
if (GhotzAuth::Login(username, password)) {
    authenticed = true;
    login_page = 0;
}
// OR: GhotzAuth::License(license_key);

// 3) Main loop — only draw cheat/menu when authenticed == true:
if (login_page && !authenticed)
    LoginScreen_Render(&authenticed, &login_page);
else if (authenticed)
    DrawYourMainMenu();

API: POST https://keyghotz.space/api/1.2/index.php (form-urlencoded). See example/WINMAIN_SNIPPET.txt in the ZIP.

Step 7 — Build and test

  1. Build Release | x64.
  2. Run EXE → login with a user you created in the panel (username + password).
  3. If error says <!DOCTYPE html> → re-upload api/1.2/ on the server (see API_DEPLOY_FIX.md in the website package).
  4. If Session not found → upload latest api/1.2/index.php on Hostinger, rebuild EXE.
  5. If invalidver → version in code ≠ version in App Settings.

Migrating from KeyAuth?

Keep your old SDK. Change only:

KeyAuth → Ghotz drop-in guide

Use AI to do this faster

In the dashboard: Manage Apps → your app → Part 8 — Full AI guide → copy prompt into Cursor. The prompt includes your real credentials and this exact file layout.

How the AI prompt works →

Shorter EXE overview · DLL guide · ← All tutorials