Register
const url = 'https://example.com/auth/register/';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"jdoe","password":"example","email":"jdoe@example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/auth/register/ \ --header 'Content-Type: application/json' \ --data '{ "username": "jdoe", "password": "example", "email": "jdoe@example.com" }'Create a password account.
Needs both self-registration and password login enabled; otherwise 403. When the allowed email domains list is set, an email address in one of those domains is required.
If email verification is required, the request includes an email address and the server has SMTP configured, the account activates when its owner follows the emailed link and gets the default self-registration role. Otherwise it stays pending until an administrator approves it with a role. The response is the same whether or not the username or email was taken.
Request Bodyrequired
Section titled “ Request Bodyrequired ”Responses
Section titled “ Responses ”Successful Response
Bad request — invalid query parameters or payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks access to this resource
Not found
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Bad gateway — an upstream provider failed
Service unavailable — the database could not serve the request