API Documentation
Making Requests
All requests must have a content type of application/json
All requests must include your API key as the header LuaShield-API-Key
We have a ratelimit of 60 requests per minute, however this can change depending on the endpoint
Handling Errors
When an error occurs we will return a status code of 4xx/5xx and return a JSON object with an error
{
"error": "LuaShield > all???"
}
Quick Example
If you provide a valid API key this will output your account information
const fetch = require("node-fetch");
const LUASHIELD_API_KEY = "";
async function GetAccountInformation() {
return new Promise(async (resolve, reject) => {
let Response = await fetch("https://api.luashield.com/account", {
method: "GET",
headers: {
["LuaShield-API-Key"]: LUASHIELD_API_KEY
}
})
.then(res => res.json())
.catch(er => reject(er.toString()))
if (Response?.error) {
reject(Response.error);
}
resolve(Response);
});
}
(async () => {
let AccountInformation = await GetAccountInformation()
.catch(er => console.log(er));
console.log(AccountInformation)
})();
Last updated