verifyEmailAddress method

Future<ClientResponse<void, Errors>> verifyEmailAddress(
  1. VerifyEmailRequest request
)

Confirms a user's email address.

The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When the tenant is configured to gate a user until their email address is verified, this procedures requires two values instead of one. The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The two values together are able to confirm a user's email address and mark the user's email address as verified.

@param {VerifyEmailRequest} request The request that contains the verificationId and optional one-time use code paired with the verificationId. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<void, Errors>> verifyEmailAddress(
    VerifyEmailRequest request) {
  return _startAnonymous<void, Errors>()
      .withUri('/api/user/verify-email')
      .withJSONBody(request)
      .withMethod('POST')
      .go();
}