Resend confirmation email rule/button

Hi @dan.woda

Thank you ! It works now :slight_smile: Code looks like following now in the rule:

function (user, context, callback) {
 var ManagementClient = require('auth0@2.9.1').ManagementClient;
 var management = new ManagementClient({
    token: auth0.accessToken,
   domain: auth0.domain
  });

  var params = {
       user_id: user.user_id
   };
  console.log("1", user);
  console.log("2", params.user_id);
  management.sendEmailVerification(params, function (err) {
       if (err) {
           // Handle error.
          console.log(err);
       }

   console.log("email sent?");
   callback(null, user, context);
  });
}

Just a heads up, the example for “sendVerificationEmail” API you sent previous was missing the params in the method call - which is why it was missing in my previous post :slight_smile:

A last question, is it possible to make a call to my Azure SQL DB when the send verification was successfully sent? Got a variable on my user I want to update in database at the same time. Edit: Found my answer to the db call stuff by going to ‘connections-> database → verify’ :slight_smile:

Best regards,
nkr