Skip to content

Resend Email Confirmation

Description

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.

Method

Non-Blocking API

public void Backendless.UserService.ResendEmailConfirmation( String identityValue, AsyncCallback<Object> callback )
public async Task Backendless.UserService.ResendEmailConfirmationAsync( String identityValue )

Blocking API

public void Backendless.UserService.ResendEmailConfirmation( String identityValue );

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. Can be a string number or number.
callback An object which receives either a return value or an error from the server. The return value from the server the BackendlessUser object with the ID assigned by the server-side.

Return Value

None. If the API request completes successfully, it means an email confirmation message has been sent to the user. Otherwise, an error will be returned.

Examples

The example below resends a new confirmation email to the "alice@yourmail.com".

Non-Blocking API

// Async callback method call:
String email = "alice@yourmail.com";   Backendless.UserService.ResendEmailConfirmation( email, new BackendlessAPI.Async.AsyncCallback<Object>(
      response =>
      {
        // Result
      },
      fault =>
      {
        // Error has appeared
      }));


// Async method call:

String email = "alice@yourmail.com";
await Backendless.UserService.ResendEmailConfirmationAsync( email );

Blocking API

String email = "alice@yourmail.com";
Backendless.UserService.ResendEmailConfirmation( email );

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.

Codeless Reference
user_service_codeless_resend_confirmation_email

where:

Argument                Description
user identity Built-in user property used for the Login, Restore Password and other operations. By default the user identity is anemailbut can be changed to any other identifier in theUsers data table.

This operation does not return a value. If the API request completes successfully, it means an email confirmation message has been sent to the user. Otherwise, an error will be returned.

The example below resends an email confirmation to the user identity "alice@youremail.com".

user_service_codeless_example_resend_email_confirmation