DiscoryAuth
OFFICIAL CLIENT SDks

Code Examples & SDKs

Zero-friction starter projects ready to compile. Choose your platform below to explore plug-and-play code snippets with built-in HWID hardware locking.

C++ Native Windows SDK

Uses Windows native winhttp.lib for ultra-fast, dependency-free HTTPS. Ideal for game overlays & DirectX 11 apps.

src/main.cpp
#include <iostream>
#include <string>
#include "discoryauth.hpp"

using namespace Discory;

// 1. Configure application credentials from https://discoryauth.cc/app/
const std::string APP_NAME    = "My Protected App";
const std::string APP_ID      = "YOUR_OWNER_ID";
const std::string APP_SECRET  = "YOUR_APP_SECRET";
const std::string APP_VERSION = "1.0";
const std::string API_URL     = "https://discoryauth.cc/api/v1";

int main() {
    std::cout << "Initializing DiscoryAuth Secure Cloud Handshake...\n";

    api DiscoryApp(APP_NAME, APP_ID, APP_SECRET, APP_VERSION, API_URL);
    DiscoryApp.init();

    if (!DiscoryApp.response.success) {
        std::cout << "[-] Init Failed: " << DiscoryApp.response.message << std::endl;
        system("pause");
        return 1;
    }

    std::cout << "[+] Connected! Server Status: Operational\n\n";

    std::cout << "Enter License Key: ";
    std::string key;
    std::cin >> key;

    // Fast Key-Only Login with automated hardware binding (HWID)
    DiscoryApp.license(key);

    if (DiscoryApp.response.success) {
        std::cout << "\n[+] Access Granted! Welcome " << DiscoryApp.user_data.username << "\n";
        std::cout << "[+] Subscription Expiry: " << DiscoryApp.user_data.expires << "\n";
        std::cout << "[+] Hardware Bound (HWID): " << DiscoryApp.user_data.hwid << "\n";

        // Fetch protected cloud variable string
        std::string secretOffset = DiscoryApp.var("game_offset_v1");
        std::cout << "[+] Decrypted Cloud Secret: " << secretOffset << "\n";
    } else {
        std::cout << "\n[-] Authentication Failed: " << DiscoryApp.response.message << std::endl;
    }

    system("pause");
    return 0;
}

C# / .NET SDK (Console & WinForms)

Clean async/await wrappers compatible with .NET 6, 7, 8, and .NET Framework 4.8. Includes dark-mode Windows Form.

Program.cs
using System;
using Discory;

namespace DiscoryAuthApp
{
    class Program
    {
        public static api DiscoryApp = new api(
            name: "My C# Protected App",
            ownerid: "YOUR_OWNER_ID",
            secret: "YOUR_APP_SECRET",
            version: "1.0",
            apiUrl: "https://discoryauth.cc/api/v1"
        );

        static void Main(string[] args)
        {
            Console.Title = "DiscoryAuth C# Client";
            Console.WriteLine("Initializing handshake...");

            DiscoryApp.init();

            if (!DiscoryApp.response.success)
            {
                Console.WriteLine("Error: " + DiscoryApp.response.message);
                Console.ReadLine();
                return;
            }

            Console.Write("Enter your License Key: ");
            string key = Console.ReadLine();

            DiscoryApp.license(key);

            if (DiscoryApp.response.success)
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine($"\n[SUCCESS] Welcome {DiscoryApp.user_data.username}!");
                Console.WriteLine($"Expires: {DiscoryApp.user_data.expires}");
                Console.ResetColor();
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine($"\n[FAILED] {DiscoryApp.response.message}");
                Console.ResetColor();
            }

            Console.ReadLine();
        }
    }
}

Python 3 SDK

Cross-platform authentication wrapper built for Python 3.8+ using the requests module.

main.py
from discoryauth import api
import sys

# 1. Initialize DiscoryAuth API Client
app = api(
    name="My Python App",
    ownerid="YOUR_OWNER_ID",
    secret="YOUR_APP_SECRET",
    version="1.0",
    url="https://discoryauth.cc/api/v1"
)

print("Connecting to DiscoryAuth Cloud...")
app.init()

# 2. Authenticate User with License Key
key = input("Enter your License Key: ").strip()
app.license(key)

if app.check_session():
    print(f"\n[+] Access Granted! Logged in as: {app.user_data['username']}")
    print(f"[+] Subscription Level: {app.user_data['subscriptions'][0]['subscription']}")
    print(f"[+] Hardware ID: {app.user_data['hwid']}")

    # Fetch Cloud Variable
    secret_key = app.var("my_secret_variable")
    print(f"[+] Remote Config Loaded: {secret_key}")
else:
    print(f"\n[-] Login Failed: {app.response['message']}")
    sys.exit(1)

Raw REST API / cURL

Integrate with any programming language using standard HTTP POST JSON requests.

cURL / Bash
# 1. Handshake Initialization
curl -X POST https://discoryauth.cc/api/v1/init \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My App",
    "ownerid": "YOUR_OWNER_ID",
    "secret": "YOUR_APP_SECRET",
    "version": "1.0"
  }'

# 2. License Key Login with HWID Binding
curl -X POST https://discoryauth.cc/api/v1/login \
  -H "Content-Type: application/json" \
  -d '{
    "sessionid": "sess_8f3a9b21e4c7",
    "key": "DISCORY-XXXX-XXXX-XXXX",
    "hwid": "9B8A7F6E-5D4C-3B2A-1098-76543210FEDC"
  }'

Official SDKs & Bot Repositories

DiscoryAuth — Modern, secure, and easy-to-use authentication for applications, websites, games and more!

GitHub Profile
🔑 Client SDKs
Language Example Repo
C# DiscoryAuth-CSHARP-Example
C++ DiscoryAuth-CPP-Example
WPF DiscoryAuth-WPF-Example
Python DiscoryAuth-Python-Example
Java DiscoryAuth-JAVA-API
JavaScript DiscoryAuth-JS-Example
TypeScript DiscoryAuth-TS-Example
🤖 Automation Bots
Platform Bot Repo
Discord DiscoryAuth-Discord-Bot
Telegram DiscoryAuth-Telegram-Bot