Skip to content
v2.273.0

UserVerificationConfig Struct ​

User pool configuration for user self sign up.

Example ​

ts
new cognito.UserPool(this, 'myuserpool', {
  // ...
  selfSignUpEnabled: true,
  userVerification: {
    emailSubject: 'Verify your email for our awesome app!',
    emailBody: 'Thanks for signing up to our awesome app! Your verification code is {####}',
    emailStyle: cognito.VerificationEmailStyle.CODE,
    smsMessage: 'Thanks for signing up to our awesome app! Your verification code is {####}',
  },
});

Properties ​

emailBodystringemail_bodystremailBodyStringEmailBodystringEmailBody*string= 'The verification code to your n…#
The email body template for the verification email sent to the user upon sign up.
default

Default: 'The verification code to your new account is {####}' if VerificationEmailStyle.CODE is chosen, 'Verify your account by clicking on {##Verify Email##}' if VerificationEmailStyle.LINK is chosen.

emailSubjectstringemail_subjectstremailSubjectStringEmailSubjectstringEmailSubject*string= 'Verify your new account'#
The email subject template for the verification email sent to the user upon sign up.
smsMessagestringsms_messagestrsmsMessageStringSmsMessagestringSmsMessage*string= 'The verification code to your n…#
The message template for the verification SMS sent to the user upon sign up.
default

Default: 'The verification code to your new account is {####}' if VerificationEmailStyle.CODE is chosen, not configured if VerificationEmailStyle.LINK is chosen