Skip to main content
The Authentication API allows you to authenticate users via multiple methods including password, OAuth2, and one-time passwords (OTP).

Get auth methods

Retrieve available authentication methods for a collection.
string
required
The name or ID of the auth collection

Response

object
Password authentication configuration
object
OAuth2 authentication configuration
object
One-time password configuration
object
Multi-factor authentication configuration

Authenticate with password

Authenticate a user with identity and password.
string
required
The name or ID of the auth collection

Request body

string
required
The user’s identity (email, username, or other configured field)
string
required
The user’s password
string
Specific field to use for identity lookup (leave empty for auto-detection)

Response

string
JWT authentication token
object
The authenticated user record

Authenticate with OAuth2

Authenticate a user via OAuth2 provider.
string
required
The name or ID of the auth collection

Request body

string
required
OAuth2 provider name (e.g., google, github, facebook)
string
required
Authorization code from the OAuth2 provider
string
required
The redirect URL used in the initial OAuth2 request
string
PKCE code verifier (required if provider uses PKCE)
object
Additional data for creating a new user if one doesn’t exist

Response

string
JWT authentication token
object
The authenticated user record
object
OAuth2 user data and isNew flag

Authenticate with OTP

Authenticate using a one-time password.
string
required
The name or ID of the auth collection

Request body

string
required
The OTP record ID
string
required
The OTP password/code

Response

string
JWT authentication token
object
The authenticated user record

Request OTP

Request a new one-time password to be sent to the user.
string
required
The name or ID of the auth collection

Request body

string
required
The user’s email address

Response

Returns 204 No Content on success.

Refresh authentication

Refresh an existing auth token.
string
required
The name or ID of the auth collection
Authentication required: Yes (must be authenticated with the same collection)

Response

string
New JWT authentication token
object
The authenticated user record

Request password reset

Request a password reset email.
string
required
The name or ID of the auth collection

Request body

string
required
The user’s email address

Response

Returns 204 No Content on success (even if email doesn’t exist, to prevent enumeration).

Confirm password reset

Confirm password reset with token.
string
required
The name or ID of the auth collection

Request body

string
required
The password reset token from the email
string
required
The new password
string
required
Password confirmation (must match password)

Response

Returns 204 No Content on success.

Request verification

Request an email verification message.
string
required
The name or ID of the auth collection

Request body

string
required
The user’s email address to verify

Response

Returns 204 No Content on success.

Confirm verification

Confirm email verification.
string
required
The name or ID of the auth collection

Request body

string
required
The verification token from the email

Response

Returns 204 No Content on success.

Request email change

Request to change the authenticated user’s email.
string
required
The name or ID of the auth collection
Authentication required: Yes

Request body

string
required
The new email address

Response

Returns 204 No Content on success.

Confirm email change

Confirm email change with token.
string
required
The name or ID of the auth collection

Request body

string
required
The email change token
string
required
The user’s current password

Response

Returns 204 No Content on success.

Common error codes