Access
Generate a one-time password (OTP)
Generates a one-time password for a given email, with an optional expiration time, and sends it via email.
POST
Authorizations
The API key required for accessing protected routes. It should be included in the request headers as x-api-key
.
Body
application/json
The email address for which to generate the OTP.
Optional. The expiration time of the OTP in seconds.
Required range:
x >= 1
Response
201
application/json
OTP generated and sent successfully.
The ID of the generated OTP record.
Example:
"5d162e6f-20ed-4a8c-b7bb-44a53b6f7d8a"
Confirmation message that the OTP has been sent.
Example:
"OTP sent successfully"
The email to which the OTP was sent.
Example:
"user@example.com"