Can't update change password email template via API

Hi, I am trying to automate an Auth0 workflow that allows us to update email templates via the Auth0 Management API.

There appears to be an issue specifically with the change_password template. The other templates I’m able to access but not this one. I noticed that in the documentation it’s flagged as “legacy”. Is that why I can’t access it?

I’m using the node.js 2.42.0 API to just do this as a test…

// Works
console.log(
  await authClient.getEmailTemplate({
    name: "verify_email",
  })
)

// Fails
console.log(
  await authClient.getEmailTemplate({
    name: "change_password",
  })
)

What am I doing wrong?

Thank you,
Casey

Hi @CPU,

Welcome to the Auth0 Community!

I understand that you have encountered issues when trying to update the change_password email template using the Management API.

After testing this myself, I found the same observations as you. The change_password and password_reset email templates are tagged as legacy and are meant only for legacy tenants.

In this case, I believe the correct email template you are looking for is labeled reset_email. I can confirm that this email template produces the Change Password email template found in the Auth0 Dashboard.

I hope this helps!

Please let me know if there’s anything else I can do to help.

Thank you.

Thanks for the reply @rueben.tiow ! I’ll try that out.

But one more question/confusion as I’m not sure if the email_reset will suit my needs … my overall goal right now is to invite new users to a private beta where I have signups disabled.

I was following this Auth0 guide on how to do that. In that guide, it explicitly recommends to use and modify the Change Password template. I’m able to edit the Change Password template, the supposed legacy template, in the Auth0 dashboard and it works perfectly. So if this is a legacy template, why can I edit in the dashboard but not via API?

Thanks for your help.

Hi @CPU,

Thank you for your response.

Please allow me to clarify that legacy tenants are tenants that were created before a certain date. I cannot confirm the exact date, but if your tenant is relatively new, it is likely not a legacy tenant.

I have the option of inspecting tenant flags as well, and if you prefer, you could send me a direct message of your tenant name for me to verify.

Yes, that is the correct documentation for repurposing a Change Password email template to invite your users to your application. And there are two options to update the “Change Password” email template, namely through the:

  1. Auth0 Dashboard > Branding > Email Templates > Change Password
  2. Auth0 Management API Update an email template endpoint with the reset_email email template.

I have verified that the reset_email template match the template found in the Auth0 Dashboard. Hence, newer tenants should use the reset_email email template with the Management API.

I will admit that this is confusing. However, I believe it is done this way to preserve the existing Change Password email template with legacy tenants.

I hope I was clear and able to answer your questions.

Please let me know if you have any additional questions.

Thank you.

Thank you for clarifying @rueben.tiow ! That is indeed confusing :laughing: but I appreciate the insight.

Well, if anything, I hope this feedback is helpful in improving/clarifying that guide.

Thanks again,
Casey

1 Like