luauth

1.2.4 • Public • Published

Luauth API Wrapper

IMPORTANT!!!!!!

You have to whitelist the IP Address of your server under the 'profile' page!

Info

This project is an API Wrapper for Luauth.


Table of contents:

  • Setup Process
  • Functions
    • getApiKeyDetails
    • whitelistIdentifier
    • unwhitelistIdentifier
    • unbanIp
    • getDetails
    • getIdentifiers
    • createScript
    • updateScript
    • deleteScript
    • getLoader
    • getApiActionLogs
    • getScriptActionLogs

Setup

npm install luauth

Import the package

const Luauth = require('luauth');

Connect with API Key

// Using Classes
const luauth = new Luauth("api_key"); // Your Luauth API Key comes here

// Using connect function
const luauth = Luauth.login("api_key"); // Your Luauth API Key comes here

Functions

luauth.getApiKeyDetails()

luauth.getApiKeyDetails().then((res) => {
    console.log(res.data) // Will log the details about the API key in the console.
    // error status 401: invalid API key
})

luauth.whitelistIdentifier(script_id, identifier, auth_expire, note)

luauth.whitelistIdentifier("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)", 1662910175, "CUSTOM NOTE FOR CLIENT. THIS MIGHT MAKE IT EASIER TO IDENTIFY THE USER.").then((res) => {
    console.log(res.data) // Will log the status of the action to the console. ({ "success": true, "message": "User has been whitelisted!" })
    // error status 400: { "success": false, "message": "Invalid script ID" }
})

luauth.unwhitelistIdentifier(script_id, identifier)

luauth.unwhitelistIdentifier("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)").then((res) => {
    console.log(res.data) // Will log the status of the action to the console. (status: 200)
    // error status 400: { "success": false, "message": "Identifier not whitelisted" }
})

luauth.unbanIp(script_id, identifier)

luauth.unbanIp("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)").then((res) => {
    console.log(res.data) // Will log the status of the action to the console. (User has been unbanned)
})

luauth.getDetails(script_id, identifier)

luauth.getDetails("YOUR SCRIPT ID", "IDENTIFIER OF USER (IPV4, IPV6, HWID)").then((res) => {
    console.log(res.data) // Will log details about users to the console
    // error status 400: Invalid Script ID or Identifier
})

luauth.getIdentifiers(script_id)

luauth.getIdentifiers("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log every whitelisted user to the console
    // error status 400: Invalid Script ID
})

luauth.createScript(script_name, platform, script, logs_webhook, alerts_webhook, ffa, silent)

luauth.createScript(
    "My Super Cool Script", // Enter a name you want the script to have
    "roblox", // Enter the platform for the script (roblox, fivem, csgo)
    "print('troll')", // Enter the actual script
    "https://discordwebhookblahblah", // Enter the webhook where you want logs to be sent to
    "https://discordwebhookblahblah", // Enter the webhook where you want alerts to be sent to
    true, // Define if free for all or not (free for all means the script is accessible for everyone and no one has to be whitelisted)
    true, // If true Luauth wont print debug messages to the console    
).then((res) => {
    console.log(res.data) // Will log the status of the action to the console.
    // error status 400: Missing parameters
    // error status 500: Something went wrong while obfuscating, syntax error?
})

luauth.updateScript(script_id, platform, script, logs_webhook, alerts_webhook, ffa, silent)

luauth.updateScript(
    "YOUR SCRIPT ID" // Enter the ID Of your script here
    "roblox", // Enter the platform for the script (roblox, fivem, csgo)
    "print('troll')", // Enter the actual script
    "https://discordwebhookblahblah", // Enter the webhook where you want logs to be sent to
    "https://discordwebhookblahblah", // Enter the webhook where you want alerts to be sent to
    true, // Define if free for all or not (free for all means the script is accessible for everyone and no one has to be whitelisted)
    true, // If true Luauth wont print debug messages to the console    
).then((res) => {
    console.log(res.data) // Will log the status of the action to the console.
    // error status 400: Missing parameters
    // error status 500: Something went wrong while obfuscating, syntax error?
})

luauth.deleteScript(script_id)

luauth.deleteScript("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log the status of the action to the console.
    // error status 400: Invalid Script ID
})

luauth.getLoader(script_id)

luauth.getLoader("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log the script loader to the console.
    // error status 400: Invalid Script ID
})

luauth.getApiActionLogs()

luauth.getApiActionLogs().then((res) => {
    console.log(res.data) // Will log the api action logs to the console.
})

luauth.getScriptActionLogs()

luauth.getScriptActionLogs("YOUR SCRIPT ID").then((res) => {
    console.log(res.data) // Will log the script action logs to the console.
})

Authors

Package Sidebar

Install

npm i luauth

Weekly Downloads

2

Version

1.2.4

License

MIT

Unpacked Size

13.7 kB

Total Files

4

Last publish

Collaborators

  • vinnnn