Send Email Verification Email
POST/api/auth/email/verification/send
Send an email verification email to the user.
This endpoint is for resending the verification email only. When registering a user and email is enabled in your application an email containing a link is automatically sent to the user's email address. This link should point to the frontend of your application. You can find more information about this here. Your frontend should extract the token from the URL and send it to this endpoint with the token as request parameter.
You can perform the verification using the token through the endpoint POST /api/auth/email/verification.
Note: If email is disabled, there is no way to verify a user's email address.
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.
Tokens
- A valid
AccessTokenis required.
Note: After each email, a cooldown will be started. You can check the status of the cooldown through the endpoint
GET /api/auth/email/verification/cooldown. When the cooldown is active, no new verification email can be sent. The cooldown can be configured here.
Request
Responses
- 200
- 304
- 401
- 404
- 429
- 500
- 503
The number of seconds the user needs to wait before sending a new email.
The following error codes correspond to this status:
EMAIL_ALREADY_VERIFIED: User's email is already verified.
The following error codes correspond to this status:
ACCESS_TOKEN_EXPIRED: Indicates that the access token is expired.ACCESS_TOKEN_INVALID: Indicates that the access token cannot be decoded.AUTHENTICATION_REQUIRED: User is not authenticated.
The following error codes correspond to this status:
USER_NOT_FOUND: User not found.
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:
ACCESS_TOKEN_ALLOWLIST_READING_FAILURE: Represents an exception indicating a failure when reading the allowlist for an access token cache.DATABASE_FAILURE: Exception representing a general failure related to database operations.DATABASE_ENCRYPTION_FAILURE: Exception representing a general failure related to database encryption operations.EMAIL_COOLDOWN_CACHE_FAILURE: Thrown when an exception occurs when setting or getting cooldown.EMAIL_AUTHENTICATION_FAILURE: Thrown when there is a failure related to email authentication.EMAIL_VERIFICATION_TOKEN_CREATION_FAILURE: Exception thrown when an error occurs during token creation.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.
The following error codes correspond to this status:
EMAIL_DISABLED: Thrown when email functionality is disabled in the application.