Verification Email Redirect: Pass User Email Address as a Parameter

Overview

This article explains whether it is possible to pass a user’s email address as a parameter to the redirect URL configured in the verification email.

Solution

It is possible by setting includeEmailInRedirect to true in the verify email template. This needs to be done via the management API, as the dashboard has no toggle.

  • Use the Patch an email template endpoint for this, which requires the update:email_templates scope.
  • Use the following call where <token> is the management API token:

curl -L -X PATCH 'https://<tenant>.auth0.com/api/v2/email-templates/verify_email' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <token>' \ -d '{"includeEmailInRedirect":true}'