Can't send password reset email

I can’t send a password reset email. I need to have an endpoint on my api that calls auth0 to send the email and I’ve copied the code directly from the docs while logged in. The request just hangs - nothing happens?

I see some docs refer to “Email templates”, which don’t seem to be available for us on our dashboard?

Any idea what is going on?

Here is the request:

  var options = {
    method: "POST",
    url: "https://ammonitewealth.eu.auth0.com/dbconnections/change_password",
    headers: { "content-type": "application/json" },
    data: {
      client_id: "my_client_id",
      email: userEmail,
      connection: "Username-Password-Authentication",
    },
  };

  axios
    .request(options)
    .then(function (response) {
      console.log(response.data);
    })
    .catch(function (error) {
      console.error(error);
    });

Hi @melanie.alexandra ,

Thank you for posting your query on the Auth0 Community!

This is the code snippet from postman for the “Create a password change Ticket” endpoint. Here is the details from the Management API.

var axios = require('axios');
var data = JSON.stringify({
  "result_url": "",
  "user_id": "",
  "new_password": "",
  "connection_id": "",
  "email": "",
  "ttl_sec": 0
});

var config = {
  method: 'post',
  url: 'https://{{auth0_domain}}/api/v2/tickets/password-change',
  headers: { 
    'Authorization': 'Bearer {{auth0_token}}',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

By comparing it with your code, I noticed that your header does not have the Authorization with the bearer token.

Hope it helps!