/api/auth/register
POST Register a user
Info
- Having administrator permissions will allow access to this endpoint despite having both
FEATURES_INVITES
andFEATURES_USER_REGISTRATION
disabled. - Having super administrator permissions will allow the
administrator
field to be used.
Body (JSON)
Field Name | Type | Description |
---|---|---|
code | string | The invite code |
username | string | The username |
password | string | The password |
administrator | boolean | Whether to grant admin |
200 Ok (JSON)
Returns a user object
400 Bad Request (JSON)
-
This endpoint is unavailable due to current configurations
- Both registration and invites are disabled. -
Already logged in
- The non-administrator user is already logged in. -
Bad invite
- The invite code provided is invalid due to it either being used/expired or invalid. -
Bad Username/Password
- There are 3 cases where this occurs- The username already exists
- An invite code is provided despite being disabled
- Either username or password in the body's request is missing.
POST Create a user (admin)
Info
Requires authentication
Info
Requires administrator privileges
Body (JSON)
Field Name | Type | Description |
---|---|---|
username | string | The username of the user |
password | string | The password of the user |
administrator | boolean | Whether the user is an administrator |
200 Ok (JSON)
Returns a user object
400 Bad Request (JSON)
Last updated: 3/3/2024
Edit this page on GitHub