Skip to content

Resend/Create Email Confirmation

Resending Email Confirmation

This API resends the email confirmation email message to a user. It applies only to the apps which have the "Require email confirmation" option enabled. If the user status is "email confirmation pending", then an email with the confirmation link is resent, otherwise an error occurs.


Backendless.UserService.resendEmailConfirmation( identityValue )
 .then( function() {
   })
 .catch( function( error ) {
   });

where:

Argument                Description
identityValue Value in a column marked as identity in the Users table. By default a Backendless application has email as the identity column. In that case the parameter for the API should be the email address of a user.

Codeless Reference

The block is available in: BACKENDLESS > Users API:

resend-email-confirmation-codeless

Errors

The API call may result in the following errors. See the Error Handling section for details on how to retrieve the error code when the server returns an error.

Error Code
Description
3102
User has already confirmed the email address. Email confirmation will not be sent.
3103
Unable to send email confirmation. The "Require Email Confirmation" option must be enabled in Backendless Console (see the Users > Registration screen)
3104
Unable to send email confirmation - user account with the email cannot be found.

Create Email Confirmation URL

A confirmation email message includes a special link the user clicks to confirm their email address. When the link is clicked and the link is not expired, the user status changes from EMAIL_CONFIRMATION_PENDING to ENABLED. The email message delivered to the user is created from the Confirmation template located in Messaging > Emails in Backendless Console. There are scenarios when the link needs to be generated in your application logic, for instance, if you need to send it out via text message or if you need to generate the confirmation email dynamically. The API below is for obtaining a confirmation URL for a user:


Backendless.UserService.createEmailConfirmationURL( identityValue )
 .then( function( confirmationURL ) {
   })
 .catch( function( error ) {
   });

where:

Argument                Description
identityValue Value in a column marked as identity in the Users table. By default a Backendless application has email as the identity column. In that case the parameter for the API should be the email address of a user.

Result

Confirmation URL as a string value.