new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · Plugins · all subjects

admin/api-methods

13 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Remove User API endpoint

POST /admin/remove-user. Parameters: userId (string, required). Hard deletes a user from the database.

Create User API endpoint

POST /admin/create-user. Parameters: email (string, required), password (string, required), name (string, required), role (string or array of strings, optional, defaults to "user"), data (Record<string, any>, optional for extra fields including custom fields).

List Users API endpoint

GET /admin/list-users. Optional parameters: searchValue (string), searchField ("email" or "name", defaults to "email"), searchOperator ("contains", "starts_with", or "ends_with"), limit (number, defaults to 100), offset (number), sortBy (string), sortDirection ("asc" or "desc"), filterField (string), filterValue (string, number, boolean, or array), filterOperator ("eq", "ne", "lt", "lte", "gt", "gte", "in", "not_in", "contains", "starts_with", or "ends_with"). Returns an object with users (User[]), total (number), limit (number or undefined), and offset (number or undefined).

Get User API endpoint

GET /admin/get-user. Parameters: id (string, required). Returns an object with data (User or null) and error (null or object with message, status, statusText, code).

Set User Role API endpoint

POST /admin/set-role. Parameters: userId (string, optional), role (string or array of strings, required).

Set User Password API endpoint

POST /admin/set-user-password. Parameters: newPassword (string, required), userId (string, required). Creates a credential account if the user doesn't already have one.

Update User API endpoint

POST /admin/update-user. Parameters: userId (string, required), data (Record<string, any>, required).

Ban User API endpoint

POST /admin/ban-user. Parameters: userId (string, required), banReason (string, optional), banExpiresIn (number in seconds, optional, no expiry if not provided). Prevents the user from signing in and revokes all existing sessions.

Unban User API endpoint

POST /admin/unban-user. Parameters: userId (string, required). Removes the ban from a user, allowing them to sign in again.

List User Sessions API endpoint

POST /admin/list-user-sessions. Parameters: userId (string, required).

Revoke All User Sessions API endpoint

POST /admin/revoke-user-sessions. Parameters: userId (string, required).

Impersonate User API endpoint

POST /admin/impersonate-user. Parameters: userId (string, required). Creates a session that mimics the specified user. Session remains active until the browser session ends or reaches 1 hour (configurable via impersonationSessionDuration option). By default, admins cannot impersonate other admin users unless granted the "impersonate-admins" permission.

Stop Impersonating User API endpoint

POST /admin/stop-impersonating. Parameters: none (empty object). Stops impersonating a user and continues with the admin account.

Give your agent this brain