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.

Method

POST

Endpoint URL

The xxxx.backendless.app is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.

https://xxxx.backendless.app/api/users/resendconfirmation/<identity>

where:

Argument                Description
<identity> 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.

Request Headers

Content-Type:application/json

where:

Argument                Description
Content-Type must be set to application/json. This header is mandatory.

Request Body

None

Response Body

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.

Codeless Reference

The block is available in: BACKENDLESS > Users API:

resend-email-confirmation-codeless

Errors

When the server-side reports an error, it returns a JSON object in the following format:

{  
  "message":error-message,  
  "code":error-code  
}

The API call may result in the following errors.

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:

Method

POST

Endpoint URL

The xxxx.backendless.app is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.

https://xxxx.backendless.app/api/users/createEmailConfirmationURL/<identity>

where:

Argument                Description
<identity> 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.

Request Headers

Content-Type:application/json

where:

Argument                Description
Content-Type Must be set to application/json. This header is mandatory.

Request Body

None

Response Body

A JSON document with the following structure:

{  
  "confirmationURL": "https://xxxx.backendless.app/api/......................."  
}