# Table of Contents - [Runtime Variables | LuaSeal](#runtime-variables-luaseal) - [Custom NPM Module | LuaSeal](#custom-npm-module-luaseal) - [API Docs | LuaSeal](#api-docs-luaseal) - [Bot Usage | LuaSeal](#bot-usage-luaseal) - [Importing Mass Users | LuaSeal](#importing-mass-users-luaseal) --- # Runtime Variables | LuaSeal GitBook Assistant GitBook Assistant Working...Thinking... GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? Ctrli AI Based on your context Send Lua Seal offers runtime variables that you can use and access in your script. These variables will give you a lot of information regrading the users key. (for example, discord id, note, total executions + more) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FzifGebGRrm5KXhtUBH9o%252Fruntime.png%3Falt%3Dmedia%26token%3D5a2436e5-8790-4699-88fc-bfe4ed33614a&width=768&dpr=4&quality=100&sign=72ac6761&sv=2) **Variable Types** ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FanLI3eCOF5NVSOXhX1bz%252Fruntime%2520types.png%3Falt%3Dmedia%26token%3Dc6e8f245-22df-4dd3-8b03-1291f53447d1&width=768&dpr=4&quality=100&sign=651dc0cb&sv=2) [PreviousBot Usage](https://docs.luaseal.com/m/bot) [NextCustom NPM Module](https://docs.luaseal.com/m/custom-npm-module) Last updated 12 days ago --- # Custom NPM Module | LuaSeal GitBook Assistant GitBook Assistant Working...Thinking... GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? Ctrli AI Based on your context Send To make things very simple for you, we have made our very own NPM module that will make custom use of our API very quick, clean and easy. * * * [https://www.npmjs.com/package/luasealwww.npmjs.com](https://www.npmjs.com/package/luaseal) Here you can find the direct link to our package, on that page you will find basic examples and more in depth information about the included module functions/how to use them properly/what is optional-required * * * Copy npm i luaseal Copy // Example usage const LuaSeal = require("luaseal"); const seal = new LuaSeal("seal_yourApiKeyHere", "yourProjectId"); (async () => { const key = await seal.generateKey({ key_days: 31 }); console.log("Generated Key:", key); await seal.updateKey(key, { discord_id: "314159265358979" }); console.log("Key updated"); await seal.blacklistKey(key); console.log("Key blacklisted"); await seal.unblacklistKey(key); console.log("Key unblacklisted"); try { await seal.resetKeyHwid(key, { force: true }); console.log("HWID reset"); } catch (error) { console.log("Error resetting HWID:", error.message); } const info = await seal.getKeyInfo({ user_key: key }); console.log(info); console.log(info[0].user_key); console.log(info[0].banned); const allKeys = await seal.getAllKeys(); const randomEntry = allKeys[Math.floor(Math.random() * allKeys.length)]; console.log(allKeys[randomEntry].user_key); console.log(allKeys[randomEntry].discord_id) })(); [PreviousRuntime Variables](https://docs.luaseal.com/m/variables) [NextImporting Mass Users](https://docs.luaseal.com/m/importing-mass-users) Last updated 3 days ago --- # API Docs | LuaSeal GitBook Assistant GitBook Assistant Working...Thinking... GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? Ctrli AI Based on your context Send Make sure you are using the correct parameter types (Path, Query, Body, Headers) **failure to do so will result in a failed request** Our API has rate limits, each endpoint however the maximum will always be **60 request minute. Going over this limit will result in a** `**429**` **If you are making a API request from a unauthorized IP address Cloudflare will automatically block your request before even reaching our servers!** **If a parameter name has a** **\*** **at the end that means that it is optional to include with the request.** * * * Here is a GitHub repository that provides real examples on how to actually use the API if you need. [![Logo](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Ffluidicon.png&width=20&dpr=4&quality=100&sign=3ea9394e&sv=2)GitHub - LuaSeal/Examples: Examples that will hopefully guide you through anything you need.GitHub](https://github.com/LuaSeal/Examples) * * * [](https://docs.luaseal.com/m/api#generating-key-whitelisting-user) Generating Key/Whitelisting User --------------------------------------------------------------------------------------------------------- `**POST**` `https://luaseal.com/api/projects/:project_id/users` this endpoint generates a new key, if you don't specify specific data in the request body the key will still be generated. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Body** Name Type Description discord\_id**\*** String The discord ID that is linked to the key note**\*** String The note connected to the key key\_days**\*** Number The amount of days OR the unix timestamp for when the keys kill will expire after being redeemed. (leave blank or set as -1 for infinite whitelist) 200: Valid Request 400: Failed Request Copy { "success": true, "response": "Success", "user_key": "generated_key_here" } Copy { "success": false, "response": "Error message here" } * * * [](https://docs.luaseal.com/m/api#getting-key-data) Getting Key Data ------------------------------------------------------------------------- `**GET**` `https://luaseal.com/api/projects/:project_id/users` this endpoint returns an array of every key found with the same specified values in the body. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Queries** Name Type Description discord\_id**\*** String The discord ID that is linked to the key user\_key**\*** String Get data for a specific key hwid**\*** String The hwid that is linked to the key 200: Valid Request 400: Failed Request Copy { "success": true, "users": [\ {\ user_key: "key_value",\ identifier: "user_current_hwid",\ discord_id: "linked_discord_id",\ status: "active" // active/banned/inactive \ last_reset: 1763474308,\ total_resets: 0, \ auth_expire: 1763474308,\ banned: false,\ ban_reason: "user was not cool",\ ban_expire: 1763474308,\ total_executions: 0,\ note: "note connected to key"\ }\ ] } Copy { "success": false, "response": "Error message here" } * * * [](https://docs.luaseal.com/m/api#resetting-key-hwid) Resetting Key HWID ----------------------------------------------------------------------------- `**POST**` `https://luaseal.com/api/projects/:project_id/resethwid` this endpoint resets the HWID connected to a users key, there is a default cooldown of 7 days in-between resets however if the "force" body is included then it will overwrite that cooldown. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Body** Name Type Description user\_key String The user key to reset the HWID for force**\*** Boolean Whether to override the automatic 7 day reset cooldown 200: Valid Request 400: Failed Request Copy { "success": true, "response": "HWID reset successfully" } Copy { "success": false, "response": "Error message here", "unix": 1577800861 // Only on requests where they are on a cooldown! } * * * [](https://docs.luaseal.com/m/api#blacklisting-a-key) Blacklisting A Key ----------------------------------------------------------------------------- `**POST**` `https://luaseal.com/api/projects/:project_id/blacklist` this endpoint blacklist the specified key from future executions. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Body** Name Type Description user\_key String The user key to reset the HWID for reason**\*** String The reason for the blacklist expire\_time**\*** Number The amount of days OR the unix timestamp for when the blacklist expire. (leave blank or set as -1 for infinite duration) 200: Valid Request 400: Failed Request Copy { "success": true, "response": "Key has been blacklisted successfully" } Copy { "success": false, "response": "Error message here" } * * * [](https://docs.luaseal.com/m/api#unblacklisting-a-key) Unblacklisting A Key --------------------------------------------------------------------------------- `**POST**` `https://luaseal.com/api/projects/:project_id/unblacklist` this endpoint blacklist the specified key from future executions. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Body** Name Type Description user\_key String The user key remove the blacklist from 200: Valid Request 400: Failed Request Copy { "success": true, "response": "Key has been unblacklisted successfully" } Copy { "success": false, "response": "Error message here" } * * * [](https://docs.luaseal.com/m/api#updating-a-key) Updating A Key --------------------------------------------------------------------- `**PATCH**` `https://luaseal.com/api/projects/:project_id/users` This endpoint updates the data connected to the specified key. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Body** Name Type Description user\_key String They key to update the data for note**\*** String The note connected to the key key\_days**\*** Number The amount of days OR the unix timestamp for when the keys kill will expire after being redeemed. (leave blank or set as -1 for infinite whitelist) discord\_id**\*** String The discord id to link the key to (only can be set once!!!) 200: Valid Request 400: Failed Request Copy { "success": true, "response": "Key has been updated successfully" } Copy { "success": false, "response": "Error message here" } * * * [](https://docs.luaseal.com/m/api#deleting-a-key) Deleting A Key --------------------------------------------------------------------- `**DELETE**` `https://luaseal.com/api/projects/:project_id/users` this endpoint fully deletes the specified key. **URL Parameters** Name Type Description project\_id String the ID of the project you to use **Headers** Name Type Description authorization String Your API Key **Body** Name Type Description user\_key String The user key remove the blacklist from 200: Valid Request 400: Failed Request Copy { "success": true, "response": "Key has been deleted successfully" } Copy { "success": false, "response": "Error message here" } [PreviousLuaSeal Introduction](https://docs.luaseal.com/) [NextBot Usage](https://docs.luaseal.com/m/bot) Last updated 2 hours ago --- # Bot Usage | LuaSeal GitBook Assistant GitBook Assistant Working...Thinking... GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? Ctrli AI Based on your context Send [](https://docs.luaseal.com/m/bot#bot-introduction) Bot introduction ------------------------------------------------------------------------- **To be able to use our public bot you MUST have a valid API key to link with it** **You can invite the bot to your discord server through** [**this link here**](https://discord.com/oauth2/authorize?client_id=1439922886067486720) * * * [](https://docs.luaseal.com/m/bot#logging-in-or-api-key) Logging In | API Key ---------------------------------------------------------------------------------- Once you invite the bot to your server you must connect your API key with the `**/login**` command before you can do anything. If you don't know where to find your API key refer back to introduction page on our docs. ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FXeesdolJ1KJgmwojjAqI%252Flogin.png%3Falt%3Dmedia%26token%3D3118256f-f985-449f-9735-898b6a190043&width=768&dpr=4&quality=100&sign=d0718111&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FCEZLfunyL1LwvggvDXsp%252Flogin%2520success.png%3Falt%3Dmedia%26token%3Dd2a91baa-5c25-410b-88fe-5cf5e87a104a&width=768&dpr=4&quality=100&sign=c52578dd&sv=2) If you see the response above you are ready to start using every feature the bot offers! * * * [](https://docs.luaseal.com/m/bot#setting-primary-project) Setting Primary Project --------------------------------------------------------------------------------------- Before you can use any whitelist commands you must set the primary project you want to use. This will be the project that users will be whitelisted to/blacklisted from/and get their key from. All you have to do to select your project is run the `**/setproject**` command. ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FPXHEofu8W94YKiPQYqUP%252Fsetproject.png%3Falt%3Dmedia%26token%3Dad12ca94-89ad-4ff2-9126-7ac00e38657c&width=768&dpr=4&quality=100&sign=d39ef2a5&sv=2) * * * [](https://docs.luaseal.com/m/bot#setting-management-role) Setting Management Role --------------------------------------------------------------------------------------- When setting the management role, it gives access to everyone with that specified role to run a list of these commands. When setting the management role, it gives access to everyone with that specified role to run a list of these commands. Only give this role to people you trust!!! ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252F6zUYpq6bLhYT0vgmF8tD%252Fmanagement%2520commands.png%3Falt%3Dmedia%26token%3D39df0843-db85-49ae-8b76-c493320c7d0e&width=768&dpr=4&quality=100&sign=456b46ca&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FxQ41d6AZhrCOVQPsDST2%252Fmanagement.png%3Falt%3Dmedia%26token%3Daa243a55-5985-4b0e-b108-4d1d5e75e093&width=768&dpr=4&quality=100&sign=ee631b69&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252Fchx1pGfUzFbu94xpkiRc%252Fmanagement%2520success.png%3Falt%3Dmedia%26token%3D04c3cb2d-401d-45b1-9126-f9ef976b8a63&width=768&dpr=4&quality=100&sign=12c7870d&sv=2) * * * [](https://docs.luaseal.com/m/bot#setting-buyer-role) Setting Buyer Role ----------------------------------------------------------------------------- When setting the buyer role, it will be the role that is automatically given to users upon getting whitelist/redeeming a key. If the user has a key linked to their discord account but doesn't have the buyer role they can run the `**/claimbuyer**` command to claim the role! ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FPgZ8QzaqZzsrx0zugUOO%252Fsetbuyer.png%3Falt%3Dmedia%26token%3D20e6a0be-c0c2-4743-97ee-6fa5cbee649b&width=768&dpr=4&quality=100&sign=8ea210f&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FsTCPXeWjUlU7P9yGkXoW%252Fsetbuyersuccess.png%3Falt%3Dmedia%26token%3D3d18f9b8-e67d-40cb-8294-7e478a88913b&width=768&dpr=4&quality=100&sign=d3023da6&sv=2) * * * [](https://docs.luaseal.com/m/bot#sending-project-panel) Sending Project Panel ----------------------------------------------------------------------------------- To send the project control panel embed you can use the `**/sendpanel #channel**` command, once you run this command you will be prompted with a modal allowing you to customize the embed title & embed contents. ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FWLNYIc8ZZ6P5uZc4bnMS%252Fsendpanel.png%3Falt%3Dmedia%26token%3D7f3326ad-a992-4810-8d9e-f04cf939cc3f&width=768&dpr=4&quality=100&sign=9a7b0c99&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252Fdp8ncFWbAsNKx1b3hCxi%252Ffinallllyl.png%3Falt%3Dmedia%26token%3Dcea0e660-a65a-4b87-aa18-9e8328430c0e&width=768&dpr=4&quality=100&sign=509cada0&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252Fhnv8NOjU2cpvNbF7ThRa%252Fsendpanel%2520example.png%3Falt%3Dmedia%26token%3Dc7aa7614-66b4-4bc2-a9ee-7658d448b350&width=768&dpr=4&quality=100&sign=f2dca638&sv=2) * * * [](https://docs.luaseal.com/m/bot#setting-script-loader) Setting Script Loader ----------------------------------------------------------------------------------- **Your loader must contain a valid loadstring or the loader will be denied** To set your script loader it is very simple, all you have to do is run the `**/setloader**` command and you will be prompted with a textbox to insert your loader into. This will be the code that is sent when a buyer uses the `**/script**` command. The users key will automatically be placed above your loaders code. ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FnIfkqh5vUgiKqS70xREw%252Fset%2520loader.png%3Falt%3Dmedia%26token%3Ddf325cfe-d2ee-4d6a-b9f9-55fa059f1c0b&width=768&dpr=4&quality=100&sign=22294c32&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252Ffeu0qEiV0znBJ8MMEtFA%252Fenter%2520loader%2520code.png%3Falt%3Dmedia%26token%3D7549daa3-775f-40ea-bad2-dbc40cd0c816&width=768&dpr=4&quality=100&sign=f0dee43a&sv=2) * * * [](https://docs.luaseal.com/m/bot#mass-member-whitelisting) Mass Member Whitelisting ----------------------------------------------------------------------------------------- To whitelist every single user with a specified role, all you have to do is run the /mass-whitelist @role command and every single user will be whitelisted in a matter of seconds. ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FWCW4NuG6CCHOxlN0Gwk5%252Fmw1.png%3Falt%3Dmedia%26token%3Da1106477-740d-4a10-8303-cbd11ece8e77&width=768&dpr=4&quality=100&sign=aec1efb9&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FJy6Tfq85GVtjG2bd5sEh%252Fmw2.png%3Falt%3Dmedia%26token%3D66f3e4fb-1c6d-459c-91d1-6aeb40cf8a8a&width=768&dpr=4&quality=100&sign=5207e1de&sv=2) [PreviousAPI Docs](https://docs.luaseal.com/m/api) [NextRuntime Variables](https://docs.luaseal.com/m/variables) Last updated 13 minutes ago --- # Importing Mass Users | LuaSeal GitBook Assistant GitBook Assistant Working...Thinking... GitBook Assistant ##### Good morning I'm here to help you with the docs. What is this page about?What should I read next?Can you give an example? Ctrli AI Based on your context Send We tried making it so importing users is as quick and simple as it can be. All you have to do is create an array of every key/user you want to import with the specific format below and then make 1 API call, if successful then all users will be connected to the specified project. * * * [](https://docs.luaseal.com/m/importing-mass-users#always-remember) Always Remember ---------------------------------------------------------------------------------------- * **If you do not follow the exact body format it will lead to a failed request** * **I**f you try to import **more** users then your plan limit the request will **fail** * If there is a **duplicate discord ID in the same project** the import will **stop and fail** * If there is a **duplicate key value in the same project** the import will **stop and fail** Even if you insert 15,000 keys it will only take a couple of seconds. **The only limitation is 10mb body limit, going over 10mb will result in a failed request** **The request body must ALWAYS follow this format below** Copy const users = [\ {\ key_value: "user_1_key", // REQUIRED\ discord_id: "user_1", // not required\ key_days: 31, // not required\ note: "he is user 1" // not required\ },\ { key_value: "example_key_2" }, \ { key_value: "example_key_3" }\ ]; * * * [](https://docs.luaseal.com/m/importing-mass-users#npm-example) NPM Example -------------------------------------------------------------------------------- Copy // Requires const LuaSeal = require("luaseal"); const seal = new LuaSeal(process.env.luaseal_api_key, process.env.luaseal_project_id); // Functions function generate_random_string(length) { const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let result = ''; for (let i = 0; i < length; i++) { result += chars.charAt(Math.floor(Math.random() * chars.length)); } return result; } function get_future_unix(days) { return Math.floor(Date.now() / 1000) + days * 86400; } // Generating the test key enteries const key_list = []; for (let x = 0; x < 10000; x++) { const data = { key_value: generate_random_string(12), // This field is ALWAYS REQUIRED / String type discord_id: generate_random_string(10), // Not Required / String type key_days: 31, // Not Required / Number type note: generate_random_string(20) // Not Required / String type } /* [REMEMBER] The key_days value can also be a future unix timestamp An example of that would be: key_days: get_future_unix(7) -- would return something like 1765430164 */ key_list.push(data); } console.log("generated 10000 key enteries"); // Importing all of the keys (async() => { const res = await seal.importMassKeys(key_list); console.log(res); })(); * * * [](https://docs.luaseal.com/m/importing-mass-users#api-example) API Example -------------------------------------------------------------------------------- Copy // Functions function generate_random_string(length) { const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let result = ''; for (let i = 0; i < length; i++) { result += chars.charAt(Math.floor(Math.random() * chars.length)); } return result; } // Generating the test key enteries const key_list = [\ {\ key_value: "example_key",\ discord_id: "example_discord_id",\ key_days: 31,\ note: "user note"\ }\ ]; // Importing all of the keys (async() => { const request = await fetch(`https://luaseal.com/api/projects/${process.env.luaseal_project_id}/massusers`, { method: "POST", headers: { ["Content-Type"]: "application/json", ["authorization"]: process.env.luaseal_api_key }, body: JSON.stringify({ key_list }) }); const requestResponse = await request.json(); console.log(requestResponse) })(); * * * [](https://docs.luaseal.com/m/importing-mass-users#bot-command-usage) Bot Command Usage -------------------------------------------------------------------------------------------- Our bot has the command `**/mass-whitelist **` that allows you to whitelist **every** single user with that specified role, very quick and simple to use. ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FWCW4NuG6CCHOxlN0Gwk5%252Fmw1.png%3Falt%3Dmedia%26token%3Da1106477-740d-4a10-8303-cbd11ece8e77&width=768&dpr=4&quality=100&sign=aec1efb9&sv=2) ![](https://docs.luaseal.com/~gitbook/image?url=https%3A%2F%2F1276206135-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEYfv7W1YvbFdHaJ3xCq6%252Fuploads%252FJy6Tfq85GVtjG2bd5sEh%252Fmw2.png%3Falt%3Dmedia%26token%3D66f3e4fb-1c6d-459c-91d1-6aeb40cf8a8a&width=768&dpr=4&quality=100&sign=5207e1de&sv=2) [PreviousCustom NPM Module](https://docs.luaseal.com/m/custom-npm-module) Last updated 45 minutes ago ---