General API information
info
The api url is https://api.luaauth.com
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
| Code | Message | Reason |
|---|---|---|
| -1 | internal server error | Server errored while processing your request |
| -1 | invalid endpoint | Endpoint you tried using does not exist |
| -1 | unauthorized or invalid request | You cannot access this endpoint or are giving invalid data to it |
| -1 | ratelimited | You 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 */ ]
}
}