HomeGuidesAPI Reference
API Reference

Request two-factor authentication code via email

Validates user credentials and sends a 4-digit two-factor authentication code to the user's registered email address. The code expires in 20 minutes. Use this endpoint before calling /authentication/login when the user has email-based 2FA enabled. Also supports requesting a temporary email code for users with only app-based 2FA by setting tempCode to true. No authentication required.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

User credentials for authentication before sending the 2FA code.

Request body for requesting a two-factor authentication code via email. Used with the /authentication/loginToken endpoint.

string
required
length ≥ 1

Username or user ID for authentication. Must match a valid local user account.

string
required
length ≥ 1

User password. Can be plain text or AES-GCM encrypted if isEncrypted is true.

boolean
Defaults to false

Set to true if password is AES-GCM encrypted. Defaults to false.

string

Base64-encoded initialization vector (IV) for AES-GCM password decryption. Obtain from /authentication/orchestratorRandomizer. Required only when isEncrypted is true.

boolean
Defaults to false

Set to true to request a temporary email code for users with only app-based 2FA enabled. Useful when user cannot access their authenticator app.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses
200

Two-factor authentication code sent successfully. No response body is returned. The code is emailed to the user's registered email address and expires in 20 minutes.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/html
application/json