The API url is https://api.luaauth.com
Your API key can be found on your LuaAuth Account page
Payload = Request body
| Header | Value |
| token | Your api key |
| content-type | "application/json" |
All time related fields are in unix ms format
To set any time related field to infinite, make it -1
All endpoints expect JSON for the request body
To set something to Null for any /edit endpoint, and only those endpoints, you must make it an empty string ("") in the request body
e.g { "key": "" } will make key Null in the database
{
"success": false,
"error": {
"code": 0,
"message": "ERROR_MESSAGE"
}
}Generic error messages:
| Code | Message | Reason |
| -1 | internal server error | Server errored while processing your request |
| -1 | invalid endpoint | Endpoint you sent a request to does not exist, or invalid http method used |
| -1 | unauthorized or invalid request | You are not authorized to visit that endpoint or you are giving invalid data to it |
| -1 | ratelimited | You have sent too many requests and are being ratelimited |
When you get the error message "unauthorized or invalid request" you will also be given extra data for what failed and why
Example response:
{
"success": false,
"error": {
"code": -1,
"message": "unauthorized or invalid request",
"failed": [
"UNAUTHORIZED_MESSAGE", // unauthorized errors will be a string
{ // field errors will be a table
"field": "FIELD_NAME",
"errors": [
"MESSAGE", // most field errors will be a string
{ // table is returned in some cases, such as an OR check
"message": "MESSAGE",
"errors": [ "MESSAGE" ]
}
]
}
]
}
}