Skip to content

Files

Latest commit

8a45782 · Jun 22, 2023

History

History

API1.0

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 25, 2023
Mar 4, 2023
Mar 4, 2023
Jun 22, 2023
Mar 4, 2023

KeyAuth JavaScript Example

Thanks for Automized, For Creating 1.0 Endpoint Example 💯❤️
Example is using Encryption so Request will be encrypted, and it needs to be decrypted before using.

Example Codes

Filling KeyAuth Class Constructor
const KeyAuthApp = new KeyAuth(
    '',      // Application Name
    '',     // Application OwnerId
    '',    // Application Secret
    '1.0' // Application Version
);
Initializing Application
await KeyAuthApp.Initialize();

General Features
Login
await KeyAuthApp.login("<USERNAME>", "<PASSWORD>");
Register
await KeyAuthApp.register("<USERNAME>", "<PASSWORD>", "<LICENSE/KEY>", "<OPTIONAL EMAIL>")
Forgot
await KeyAuthApp.forgot("<USERNAME>", "<EMAIL>");
License Login
await KeyAuthApp.license("<LICENSE/KEY>");
Upgrade an Account
await KeyAuthApp.upgrade("<USERNAME>", "<LICENSE/KEY>");

Variables
Get Public Variable
await KeyAuthApp.var("<VarId>");
Get User Variable
await KeyAuthApp.GetVar("<VarId>");
Set User Variable
await KeyAuthApp.SetVar("<VarId>", "<VarData>");

Banning Logged in User
await KeyAuthApp.ban();

File Downloads
await KeyAuthApp.file("<FileId>");

Webhooks
Normal Request with Params
await KeyAuthApp.webhook("<WebId>", "<Params>")
Webhook Request with Body & Content Type
await KeyAuthApp.webhook("<WebId>", "<Params>", "<Body>", "<Content Type>");
Discord Webhook Example
await KeyAuthApp.webhook("<WebId>", "", "{\"content\": \"webhook message here\",\"embeds\": null}", "application/json");

Checks
Check Session Status
await KeyAuthApp.check();
Check Blacklist Status
await KeyAuthApp.checkBlack();
Check / Fetch Online Users
await KeyAuthApp.fetchOnline();

Chats
Get 20 Latest Chat Messages
await KeyAuthApp.ChatGet();
Send Chat Message
await KeyAuthApp.ChatSend("<ChannelName>", "<Message>");

Logs
await KeyAuthApp.log("<Message>");

Additional / Extra Functions

Set/Change Console Title
await KeyAuthApp.setTitle("<NewTitle>");
Sleep is ms(s)
await KeyAuthApp.sleep("<1 sec = 1000ms>")