Still can't convince create password change ticket to send an email

Was trying to do the trick of using a password change ticket to send a new user welcome mail that has them set their password prior to first login. Added a lovely template to my “Change Password (Link)” template. Enabled and hit the “Try” button which worked great.

So I pre-create my user, and then send a password-change with the following payload:

  payload = {
            "email": email,
            "ttl_sec": 604800,  # 7 days as recommended in design doc
            "mark_email_as_verified": True,  # Keep this as a safeguard
            "connection_id": os.environ.get('AUTH0_CONNECTION_ID'),
            "client_id": os.environ.get('AUTH0_CLIENT_ID')
        }

See all sorts of “Create a password change ticket” happiness in the log and never see an email.

I found a number of 2018 posts that say “Create a password change ticket” DOES NOT send an email, but then found others that conflict with that statement. What’s the final word?

Oh, and if it doesn’t, why tease us with an email template (2 if you count the “(Code)” version)

Hi @mpatnode

Welcome back to the Auth0 Community!

Correct me if I’m wrong but based on the logs in your tenant and the description you are using the this endpoint → Auth0 Management API v2 to generate the password reset URL. By using this endpoint you only generating the URL that you have to send to the customer → Auth0 in this flow won’t send any email

Create a password change ticket for a given user. A password change ticket is a generated URL that the user can consume to start a reset password flow.

You want to use this Authentication API endpoint → Authentication API Explorer if you want Auth0 to send emails

Thanks
Dawid

Wow :exploding_head: I had no clue there was a whole API hanging off the database connection. Ended up just crafting and sending the email in my app which has some other advantages, but I have to assume others have gone down the same path as I. Thanks for the clarification!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.