User Invitation flow - Need clarity

we are evaluating Auth0 user invitation flow for user signup. We have couple of questions that were not clear.
Here is the flow we wanted to implement using User invitation

  1. As a first step capture email along with country/region code
  2. Send verification link, and user clicks on the link to verify email.
  3. Show the password screen and user adds new passoword.
  4. When user login with the username and passoword, the country code should be sent as part of the access token.

To achieve this using auth0, tried the following steps
1.Disabled Welcome and verification email templates.
2. Created a hook for post user registration as mentioned in Sending Email Invitations For Application Signup
3.created a user using the api/v2/users endpoint. User is created.
But did not receive any email when user is created. What is missing here?


  1. Is the endpoint api/v2/users protected as it requires a bearer token or available to be accessed by any mobile clients?
  2. Why is invitation mail not sent as mentioned in the above steps?

Detailed steps to achieve this flow is highly appreciated.

Hi @vidyarani.nethi

Actions are recommended over using rules + hooks. I tried above mentioned flow using Actions and I am getting password change email.

Steps that I followed:

  1. Create custom Post User Registration action, here I have called it user-invitation
  2. Add below code to custom action
var AuthenticationClient = require('auth0').AuthenticationClient;

* Handler that will be called during the execution of a PostUserRegistration flow.
* @param {Event} event - Details about the context and user that has registered.
exports.onExecutePostUserRegistration = async (event) => {
  var authClient = new AuthenticationClient({
    domain: 'YOUR_DOMAIN',
    clientId: 'YOUR_CLIENT_ID',

  var userAndConnection = {
    connection: 'Username-Password-Authentication',

  authClient.requestChangePasswordEmail(userAndConnection, function(err){
  1. Drag and drop this newly created action between Start and Complete as shown below