Skip to main content

General API information

info
info

You can get your api key in your LuaAuth account page

There is a global ratelimit of 50 requests a second, some endpoints may have stricter ratelimits

warning
  • Content-Type header must be set to application/json
  • token header must be set to YOUR_API_KEY
  • all request bodies must be json formatted
  • all endpoints timeout after 100 seconds
tip

For all edit endpoints to set something to null you must make it an empty string

So for editing stuff do "key": "" to make it null
Doing "key": null or just not setting it will just cause the endpoint to ignore it not change it

Error formatting

{
"success" false,
"error": {
"code": 0,
"message": "ERROR_MESSAGE"
// extra stuff may be here
}
}

Generic error messages

CodeMessageReason
-1internal server errorServer errored while processing your request
-1invalid endpointEndpoint you tried using does not exist
-1unauthorized or invalid requestYou cannot access this endpoint or are giving invalid data to it
-1ratelimitedYou have sent too many requests and must wait

Unauthorized or invalid request extra data

info

when you get the error message "unauthorized or invalid request", you are also given extra data for what failed and why

{
"success": false,
"error": {
"code": 0,
"message": "ERROR_MESSAGE",
"failed": [{
"field": "FIELD",
"errors": ["MESSAGE" /* most field errors will be a string here */, {
"message": "MESSAGE", /* this table is only used for fields that can fail multiple things such as JSONs */
"errors": [ "MESSAGE" ]
}]
}, "MESSAGE" /* unauthorized errors will be strings here */ ]
}
}