num_rows < 1) { dashboard\primary\error("Application not found!"); } else { $row = mysqli_fetch_array($query->result); $banned = $row["banned"]; if ($banned) { dashboard\primary\error("Application is banned!"); } else { $_SESSION['app'] = $row["secret"]; $_SESSION['name'] = $row["name"]; $_SESSION['sellerkey'] = $row["sellerkey"]; echo ''; // needed to refresh nav sidebar dashboard\primary\success("Successfully Selected the App!"); } } } if (isset($_POST['create_app'])) { $appname = misc\etc\sanitize($_POST['appname']); if ($appname == "") { dashboard\primary\error("Input a valid name"); echo ''; return; } $query = misc\mysql\query("SELECT 1 FROM `apps` WHERE name = ? AND owner = ?", [$appname, $_SESSION['username']]); if ($query->num_rows > 0) { dashboard\primary\error("You already own application with this name!"); echo ''; return; } $owner = $_SESSION['username']; if ($role == "tester") { $num_rows = misc\mysql\query("SELECT * FROM `apps` WHERE `owner` = ? AND `ownerid` = ?", [$_SESSION['username'], $_SESSION['ownerid']])->num_rows; if ($num_rows > 0) { dashboard\primary\error("Tester plan only supports one application!"); echo ''; return; } } if ($role == "Manager") { dashboard\primary\error("Manager Accounts Are Not Allowed To Create Applications"); echo ''; return; } $clientsecret = hash('sha256', misc\etc\generateRandomString()); $algos = array( 'ripemd128', 'md5', 'md4', 'tiger128,4', 'haval128,3', 'haval128,4', 'haval128,5' ); $sellerkey = hash($algos[array_rand($algos)], misc\etc\generateRandomString()); misc\mysql\query("INSERT INTO `subscriptions` (`name`, `level`, `app`) VALUES ('default', '1', ?)", [$clientsecret]); $query = misc\mysql\query("INSERT INTO `apps` (`owner`, `name`, `secret`, `ownerid`, `enabled`, `hwidcheck`, `sellerkey`) VALUES (?, ?, ?, ?, '1', '1', ?)", [$_SESSION['username'], $appname, $clientsecret, $_SESSION['ownerid'], $sellerkey]); if ($query->affected_rows != 0) { dashboard\primary\success("Successfully Created App!"); $_SESSION['app'] = $clientsecret; $_SESSION['name'] = $appname; $_SESSION['sellerkey'] = $sellerkey; } else { dashboard\primary\error("Failed to create application!"); } } if (isset($_POST['rename_app'])) { $appname = misc\etc\sanitize($_POST['appname']); if ($appname == "") { dashboard\primary\error("Input a valid name"); echo ''; return; } if ($role == "Manager") { dashboard\primary\error("Manager Accounts Aren't Allowed To Rename Applications"); echo ''; return; } $query = misc\mysql\query("SELECT 1 FROM `apps` WHERE `owner` = ? AND `name` = ?", [$_SESSION['username'], $appname]); if ($query->num_rows > 0) { dashboard\primary\error("You already have an application with this name!"); echo ''; return; } misc\mysql\query("UPDATE `accounts` SET `app` = ? WHERE `app` = ? AND `owner` = ?", [$appname, $_SESSION['name'], $_SESSION['username']]); $query = misc\mysql\query("UPDATE `apps` SET `name` = ? WHERE `secret` = ? AND `owner` = ?", [$appname, $_SESSION['app'], $_SESSION['username']]); if ($query->affected_rows != 0) { $oldName = $_SESSION['name']; $_SESSION['name'] = $appname; dashboard\primary\success("Successfully Renamed App!"); misc\cache\purge('KeyAuthApp:' . $oldName . ':' . $_SESSION['ownerid']); if ($_SESSION['role'] == "seller") { $query = misc\mysql\query("SELECT `customDomain`, `sellerkey`, `customDomainAPI` FROM `apps` WHERE `owner` = ? AND `name` = ?", [$_SESSION['username'], $appname]); $row = mysqli_fetch_array($query->result); misc\cache\purge('KeyAuthAppPanel:' . $row['customDomain']); misc\cache\purge('KeyAuthAppSeller:' . $row['sellerkey']); } } else { dashboard\primary\error("Application Renamed Failed!"); } } if (isset($_POST['pauseapp'])) { if ($role == "Manager") { dashboard\primary\error("Manager accounts aren't allowed to pause applications"); echo ''; return; } misc\cache\purgePattern('KeyAuthSubs:' . $_SESSION["app"]); misc\app\pause(); dashboard\primary\success("Paused application and any active subscriptions!"); } if (isset($_POST['unpauseapp'])) { if ($role == "Manager") { dashboard\primary\error("Manager accounts aren't allowed to unpause applications"); echo ''; return; } misc\cache\purgePattern('KeyAuthSubs:' . $_SESSION["app"]); misc\app\unpause(); dashboard\primary\success("Unpaused application and any paused subscriptions!"); } if (isset($_POST['refreshapp'])) { if ($role == "Manager") { dashboard\primary\error("Manager Accounts Aren't Allowed To Refresh Applications"); echo ''; return; } $gen = misc\etc\generateRandomString(); $new_secret = hash('sha256', $gen); $query = misc\mysql\query("UPDATE `apps` SET `secret` = ? WHERE `secret` = ? AND `owner` = ?", [$new_secret, $_SESSION['app'], $_SESSION['username']]); if ($query->affected_rows != 0) { misc\mysql\query("UPDATE `bans` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `buttons` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `chatmsgs` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `chatmutes` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `chats` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `files` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `keys` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `logs` SET `logapp` = ? WHERE `logapp` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `sessions` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `subs` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `subscriptions` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `users` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `uservars` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `vars` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `webhooks` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); misc\mysql\query("UPDATE `tokens` SET `app` = ? WHERE `app` = ?", [$new_secret, $_SESSION['app']]); $_SESSION['app'] = $new_secret; misc\cache\purge('KeyAuthApp:' . $_SESSION['name'] . ':' . $_SESSION['ownerid']); if ($_SESSION['role'] == "seller" || $_SESSION['role'] == "developer") { $query = misc\mysql\query("SELECT `sellerkey`,`customDomainAPI` FROM `apps` WHERE `owner` = ? AND `name` = ?", [$_SESSION['username'], $_SESSION['name']]); $row = mysqli_fetch_array($query->result); misc\cache\purge('KeyAuthAppSeller:' . $row['sellerkey']); misc\cache\purge('KeyAuthApp:' . $row['customDomainAPI']); } dashboard\primary\success("Successfully Refreshed App!"); } else { dashboard\primary\error("Application Refresh Failed!"); } } if (isset($_POST['deleteapp'])) { if ($role == "Manager") { dashboard\primary\error("Manager Accounts Aren't Allowed To Delete Applications"); echo ''; return; } if ($_POST['confirmappname'] !== "Confirm Deletion"){ dashboard\primary\error("Failed!"); echo ''; return; } $app = $_SESSION['app']; $query = misc\mysql\query("DELETE FROM `apps` WHERE `secret` = ?", [$app]); if ($query->affected_rows != 0) { misc\mysql\query("DELETE FROM `bans` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `buttons` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `chatmsgs` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `chatmutes` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `chats` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `files` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `keys` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `logs` WHERE `logapp` = ?", [$app]); misc\mysql\query("DELETE FROM `sessions` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `subs` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `subscriptions` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `users` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `uservars` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `vars` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `webhooks` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `auditLog` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `sellerLogs` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `whitelist` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `tokens` WHERE `app` = ?", [$app]); misc\mysql\query("DELETE FROM `accounts` WHERE `app` = ? AND `owner` = ?", [$_SESSION['name'], $_SESSION['username']]); misc\cache\purge('KeyAuthApp:' . $_SESSION['name'] . ':' . $_SESSION['ownerid']); if ($_SESSION['role'] == "seller" || $_SESSION['role'] == "developer") { $query = misc\mysql\query("SELECT `sellerkey`,`customDomainAPI` FROM `apps` WHERE `owner` = ? AND `name` = ?", [$_SESSION['username'], $_SESSION['name']]); $row = mysqli_fetch_array($query->result); misc\cache\purge('KeyAuthAppSeller:' . $row['sellerkey']); misc\cache\purge('KeyAuthApp:' . $row['customDomainAPI']); } $_SESSION['app'] = NULL; dashboard\primary\success("Successfully deleted App!"); $query = misc\mysql\query("SELECT * FROM `apps` WHERE `owner` = ? AND `ownerid` = ?", [$_SESSION['username'], $_SESSION['ownerid']]); // select all apps where owner is current user if ($query->num_rows == 1) // if the user only owns one app, select that app, otherwise select no app { $row = mysqli_fetch_array($query->result); $_SESSION['name'] = $row["name"]; $_SESSION['app'] = $row["secret"]; } else { $_SESSION['name'] = NULL; } } else { dashboard\primary\error("Application Deletion Failed!"); } } if (isset($_SESSION["app"])) { $appsecret = $_SESSION["app"]; $query = misc\mysql\query("SELECT * FROM `apps` WHERE `secret` = ?", [$appsecret]); $row = mysqli_fetch_array($query->result); $appname = $row["name"]; $secret = $row["secret"]; $version = $row["ver"]; $ownerid = $row["ownerid"]; $paused = $row["paused"]; } if (isset($_POST["closeAlert"])) { $query = misc\mysql\query("UPDATE `accounts` SET `alert` = ? WHERE `username` = ?", [NULL, $_SESSION["username"]]); if ($query->affected_rows != 0) { dashboard\primary\success("Successfully closed staff alert."); $alertMsg = NULL; } else { dashboard\primary\error("This alert can not be closed. Please contact staff."); } } ?>

Manage Applications - Manage Applications

This is where it all begins. Learn More.


Application Credentials

Simply replace the placeholder code in the example with these

public static api KeyAuthApp = new api(
    name: "", // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    ownerid: "", // Account ID
    version: "" // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
    //path: @"Your_Path_Here" // (OPTIONAL) see tutorial here https://www.youtube.com/watch?v=I9rxt821gMk&t=1s
);

View C# Example View Unity Example View Tutorial Video
std::string name = skCrypt("").decrypt(); // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
std::string ownerid = skCrypt("").decrypt(); // Account ID
std::string secret = skCrypt("").decrypt(); // Application secret (not used in latest C++ example)
std::string version = skCrypt("").decrypt(); // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
std::string url = skCrypt("https://keyauth.win/api/1.3/").decrypt(); // change if using KeyAuth custom domains feature
std::string path = skCrypt("").decrypt(); // (OPTIONAL) see tutorial here https://www.youtube.com/watch?v=I9rxt821gMk&t=1s

View C++ Example View Tutorial Video
keyauthapp = api(
    name = "", # App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    ownerid = "", # Account ID
    version = "", # Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
    hash_to_check = getchecksum()
)

View Py Example
$name = ""; // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
$ownerid = ""; // Account ID 

View PHP Example
const KeyAuthApp = new KeyAuth(
    "", // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    "", // Account ID
    "", // Encryption key, keep hidden and and protect this string in your code!
    "", // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
);

View JS Example
private static String ownerid = "", // Account ID
private static String appname = "", // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
private static String version = "" // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs

View Java Example
Private Shared name As String = "" ' App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
Private Shared ownerid As String = "" ' Account ID
Private Shared secret As String = "" ' Encryption key, keep hidden and and protect this string in your code!
Private Shared version As String = "" ' Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs

View VB Example
let mut keyauthapp = keyauth::v1_2::KeyauthApi::new(
    "", // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    "", // Account ID
    "",  // Encryption key, keep hidden and and protect this string in your code!
    "", // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
    "https://keyauth.win/api/1.2/", // This is the API URL, change this to your custom domain if you have it enabled
);

View Rust Example
KeyAuthApp.Api(
    "", // App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    "", // Account ID
    "",  // Encryption key, keep hidden and and protect this string in your code!
    "", // Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
    "", // Token Path (PUT NULL OR LEAVE BLANK IF YOU DO NOT WANT TO USE THE TOKEN VALIDATION SYSTEM! MUST DISABLE VIA APP SETTINGS)
)

View Go Example
local name = ""; -- App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
local ownerid = ""; -- Account ID
local version = ""; -- Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs

View Lua Example
KeyAuth.new.Api(
    "", # App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    "", # Account ID
    "", # Encryption key, keep hidden and and protect this string in your code!
    "" # Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
)

View Ruby Example
KeyAuth::Api(
    "", # App name - VaultCord.com FREE Discord backup bot for members & your entire server saved from terms and nukes!
    "", # Account ID
    "", # Encryption key, keep hidden and and protect this string in your code!
    "" # Application version. Used for automatic downloads see video here https://www.youtube.com/watch?v=kW195PLCBKs
);

View Perl Example
result)) { $rows[] = $r; } foreach ($rows as $row) { $appName = $row['name']; $paused = $row['paused']; if (isset($_SESSION["name"])) { $appSelected = ($_SESSION["name"] == $appName); } else { $appSelected = 0; } ?>
Application Name Status Action