SendEmailVerificationCode()

Send email with verification code

Description

Sends an email verification code.

Package Details

Interface

IEmailNotificationManager

Syntax

Task<bool> SendEmailVerificationCode(int userId, string url, string confirmationCode, bool isEnglish);

Returns

Task<bool>

API Enpoint

POST

/api/v1/notifications/verificationcode

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

emailVerificationDTO

An object with all the properties to send a verification code to a user.

Request body

Sample request body

{ "UserId": 0, "Url": "string", "ConfirmationCode": "string", "IsEnglish": true }

Return

200 OK - Successful.

400 Bad Request - Unable to send the verification email.

Example

const int userId = 200; const string url = "https://www.tc.gc.ca"; const string confirmationCode = "XYZ"; const bool IsEnglish = true; var result = await emailNotificationManager.SendEmailVerificationCode(userId, returnUrl, confirmationCode, isEnglish);