Herald
OpenapiAuth

Verify an email OTP login code and issue a session.

On a matching code: consumes it (one-time), then either logs the existing user in (login-as-consent gate) or auto-registers a new account (create-without-password → activate → register-as-consent) and issues a Bearer token family via `RedisBrowserTokenService`. Returns `BrowserTokenResponse`.

POST
/api/auth/{realmId}/login/email-otp/verify

On a matching code: consumes it (one-time), then either logs the existing user in (login-as-consent gate) or auto-registers a new account (create-without-password → activate → register-as-consent) and issues a Bearer token family via RedisBrowserTokenService. Returns BrowserTokenResponse.

Path Parameters

realmId*string

Realm ID

Request Body

application/json
  1. body
agreements?array<>|null
clientId*string
code*string
email*string
turnstileToken?string|null

Response Body

Verification successful

application/json
  1. response
accessToken*string
expiresIn*integer
Formatint64
Range0 <= value
refreshExpiresIn*integer
Formatint64
Range0 <= value
refreshToken*string
tokenType*string
Example Request
curl -X POST 'https://example.com/api/auth/string/login/email-otp/verify' \
  -H 'Content-Type: application/json' \
  -d '{
  "clientId": "string",
  "code": "string",
  "email": "string"
}'
Example Response
{
  "accessToken": "string",
  "expiresIn": 0,
  "refreshExpiresIn": 0,
  "refreshToken": "string",
  "tokenType": "string"
}