Send Password Reset Email
POST/api/auth/password/reset-request
Send a password reset request email to the user's email. You can learn more about the password reset here.
When request a password reset through this endpoint and email is enabled in your application an email containing a link is sent to the user's email address. This link should point to the frontend of your application. Your frontend should extract the token from the URL and send it to this endpoint with the token as request parameter. You can find more information about this here.
You can perform the reset using the token through the endpoint POST /api/auth/password/reset.
Note: If email is disabled, there is no way to reset the password.
If there is no account associated with the given email address, a No Principal Information email will be sent to the given email address.
Locale
A locale can be specified for this request. The email will be sent in the specified locale. You can learn more about locale in emails here.
If no locale is specified, the applications default locale will be used. You can learn more about configuring the default locale here.
Note: After each email, a cooldown will be started. You can check the status of the cooldown through the endpoint
GET /api/auth/password/reset/cooldown. When the cooldown is active, no new email can be sent. The cooldown can be configured here.
Request
Responses
- 200
- 429
- 500
- 503
The number of seconds the user needs to wait to send a new email.
The following error codes correspond to this status:
EMAIL_COOLDOWN_ACTIVE: Failed to send email because cooldown is active.
The following error codes correspond to this status:
EMAIL_COOLDOWN_CACHE_FAILURE: Thrown when an exception occurs when setting or getting cooldown.DATABASE_FAILURE: Exception representing a general failure related to database operations.EMAIL_AUTHENTICATION_FAILURE: Thrown when there is a failure related to email authentication.EMAIL_SEND_FAILURE: Represents an exception that occurs when an email cannot be sent.EMAIL_TEMPLATE_FAILURE: Thrown when there is a failure related to email template creation.PASSWORD_RESET_TOKEN_CREATION_FAILURE: Exception thrown when an error occurs during token generation.
The following error codes correspond to this status:
EMAIL_DISABLED: Thrown when email functionality is disabled in the application.