# Reset Password from UL page - connecting to custom email provider

**URL:** <https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070>\
**Category:** Get Help\
**Tags:** user-password-management, user-management\
**Created:** [August 25, 2025, 2:54pm UTC](https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070 "2025-08-25T14:54:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinw1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/martinw1/32/71118_2.png) [@martinw1](https://community.auth0.com/u/martinw1)\
**Post date:** [August 25, 2025, 2:54pm UTC](https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070/1 "2025-08-25T14:54:39Z")

</div>

I implemented a custom email provider to connect my emails to SendGrid and be able to map template\_id to an email so that we can manage our html/text email markup directly in SendGrid. For reset\_password, the key here is URL that is generated and embedded into the email. THe issue is that URL is NOT available on the event object and thus I have no way of intercepting this event and refactoring it into a SG Api call with template\_id, and URL as personalization variables passed to SG via API. It’s in the text and html fields of the event object - but I don’t want to parse those to retrieve that URL. What am I doing wrong here? Anyway else trying to do this. I should say the main driver here is that we want to manage our templates in SG, not in A0.

---

<div class="post-metadata">

**Author:** ![sumansaurav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumansaurav/32/70627_2.png) [@sumansaurav](https://community.auth0.com/u/sumansaurav)\
**Post date:** [August 25, 2025, 3:10pm UTC](https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070/2 "2025-08-25T15:10:49Z")

</div>

You’re right that the URL is embedded within the `text` and `html` fields rather than being available as a separate property, which makes it challenging to extract without parsing.

I would create my own password reset endpoint that:

- Generate a password reset ticket using Auth0 management API
- Construct the reset URL yourself
- Sends the email via SendGrid with your template

```typescript
// Example endpoint
app.post('/api/password-reset', async (req, res) => {
  const { email } = req.body;
  
  // Create password reset ticket via Auth0 Management API
  const ticket = await auth0.createPasswordChangeTicket({
    email,
    connection_id: 'your-connection-id'
  });
  
  // Send via SendGrid
  await sgMail.send({
    to: email,
    templateId: 'your-reset-password-template',
    dynamicTemplateData: {
      reset_url: ticket.ticket,
      // other variables
    }
  });
});

```

Auth0 Management API endpoint: [Create a password change ticket | Auth0 Management API v2](https://auth0.com/docs/api/management/v2/tickets/post-password-change)

Let me know if this helps

Thanks,  
Suman Saurav

---

<div class="post-metadata">

**Author:** ![martinw1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/martinw1/32/71118_2.png) [@martinw1](https://community.auth0.com/u/martinw1)\
**Post date:** [August 25, 2025, 3:20pm UTC](https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070/3 "2025-08-25T15:20:21Z")

</div>

So, just so I am clear - and this was one of my thoughts - still seems like a lot of extr work all for just one non-exposed value in event.. but

in my custom email provider handler, you are saying once I’ve intercepted the event (reset password), make a call to the Auth0API and get a ticket (URL) - and use that?

---

<div class="post-metadata">

**Author:** ![martinw1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/martinw1/32/71118_2.png) [@martinw1](https://community.auth0.com/u/martinw1)\
**Post date:** [August 25, 2025, 3:22pm UTC](https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070/4 "2025-08-25T15:22:33Z")

</div>

> [@sumansaurav](#):
>
> ```auto
>   
> 
> ```

Or actually host an entirely different endpoint to call that abstracts all that away from the handler?

---

<div class="post-metadata">

**Author:** ![sumansaurav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumansaurav/32/70627_2.png) [@sumansaurav](https://community.auth0.com/u/sumansaurav)\
**Post date:** [August 25, 2025, 3:25pm UTC](https://community.auth0.com/t/reset-password-from-ul-page-connecting-to-custom-email-provider/191070/5 "2025-08-25T15:25:58Z")

</div>

I would build a new endpoint to generate password reset ticket and use the value inside template.

I am not sure if you using any other endpoint from Auth0 Management API. If yes, this is just adding a new endpoint to existing APIs.
