Ambiguity in "Send Email Invitations for Application Signup" docs

Hello,

We’re trying to follow the guide in Send Email Invitations for Application Signup but it isn’t clear in section create-email-template which part is sending the email. My assumption is that auth0 will handle sending the invite email using the template that is configured.

But the only api call mentioned in the docs is https://{yourAuth0Tenant}/api/v2/tickets/password-change which seems to only generate the url that can be used in the email ? Is that API call also supposed to trigger the send email flow or is there another step missing from the docs. Or is it assumed that it’s the job of the application to handle sending the email, in which case I don’t see the purpose of the email template setup.

Let me know if we’re missing something, thanks in advance :slight_smile:

Hi @amine.chikhaoui ,

Welcome to the Auth0 Community!

Your assumption is correct that Auth0 handles sending the invitation email using the template that’s configured.

The Send Email Invitations for Application Signup doc mentioned

The user invitation email is derived from the "change password" template.

The create-email-template section explains details about the “Change Password” template.

The API call https://{yourAuth0Tenant}/api/v2/tickets/password-change will send an email to the user to change their password, and the “Change Password” email template is for customizing this email.

Hopefully, the above details answer your questions. Please let me know if any other concerns.

Thanks!

@lihua.zhang thanks for the clarification, we will investigate then from our side if we had something missing in the setup. But great to clarify this should be possible.

1 Like

Hi again, just reopening this as I think the documentation is either outdated or not working.

I followed the guide in Send Email Invitations for Application Signup word by word but it doesn’t seem to work as expected.

Steps to reproduce:

{
    "email": "<email>",
    "email_verified": false,
    "given_name": "Amine",
    "family_name": "Chikhaoui",
    "name": "Amine Chikhaoui",
    "connection": "<db-connection-name>",
    "verify_email": false,
  }
  • Then I used the change-password api as suggested in Send Email Invitations for Application Signup, first the documentation suggests the following which has a typo and also doesn’t work as redirect_url conflicts with client_id from the API docs (also returns http 400 when used)
curl -- request POST \
  --url 'https://{yourAuth0Tenant}/api/v2/tickets/password-change' \
  --header "Content-Type: application/json" \
  --data '{"result_url": "{yourResultURL}","user_id":,{yourUserID}","client_id":"{yourClientID","ttl_sec":0,"mark_email_as_verified":false,"includeEmailInRedirect":false}'

So I tried both with redirect_url only and client_id, but the only result I get with a successful api call is

{
  "ticket": "https://<tenant>.us.auth0.com/lo/reset?ticket=<ticket-id>#"
}

which is supposedly what should have been sent through an email as well but the email never gets sent even when the api response is an http 201 with a ticket URL. I have verified that the email provider connection works and that the change password email template works as well so I’m out of ideas about what can be missing unless the documentation is incorrect or there is something wrong with the setup but I have no way to investigate at which point this is not working.

Let me know if this is reproducible or if I have something missing. Thanks !

I did some testing and more research on this topic. As you have found, the https://{yourAuth0Tenant}/api/v2/tickets/password-change will generate a ticket that contains a link to the change password page. Your application will need to send the email to the user because Auth0 does not have an API to send an email containing the ticket link.

If you look for ways to send the change password email to users, please call the POST dbconnections/change_password endpoint.

I found this feedback regarding Send Email Invitations for Application Signup. Please click on the Vote button if it addresses your concern.

Thanks!

Unfortunately, your reply is even more confusing.

That’s the authentication api, isn’t that supposed to only be used by an authenticated user ? I’m talking here about the invitation for a first time signup case which as far as I know should be handled all by the mgmt api.

I don’t understand what you mean here ? That’s the link for the documentation I sent initially, did you mean to post another link.

1 Like

we are having the same issue is there any update on this?

Same issue, I’ve opened a post Auth0 Invite User any info @lihua.zhang

Hello Lihua!

I’m already sending the email to change password, but how can the user SignIn after changing password??? I mean he changes and then go to the callback page to enter the App.

Thanks!!