Customizing email verification messages - Amazon Cognito

Customizing email verification messages

To verify the email address of a user in your user pool with Amazon Cognito, you can send the user an email message with a link that they can select, or you can send them a code that they can enter.

To customize the email subject and message content for email address verification messages, edit the Verification message template in the Messaging tab of your user pool. You can choose a Verification type of Code or Link when you edit your Verification message template.

When you choose Code as the verification type, your custom message must contain the {####} placeholder. When you send the message, the verification code replaces this placeholder.

When you choose Link as the verification type, your custom message must include a placeholder in the format {##Verify Your Email##}. You can change the text string between the placeholder characters, for example {##Click here##}. A verification link titled Verify Your Email replaces this placeholder.

The link for an email verification message directs your user to a URL like the following example.

https://<your user pool domain>/confirmUser/?client_id=abcdefg12345678&user_name=emailtest&confirmation_code=123456

The maximum length for the message, including the verification code (if present), is 20,000 UTF-8 characters. You can use HTML tags in this message to format the contents.