Send Email Invitations for Application Signup - Sending emails via API

I’m trying to implement the “Send Email Invitations for Application Signup” use-case as found here: https://auth0.com/docs/email/send-email-invitations-for-application-signup.

I’m able to use Auth0’s Management API to create a user and a password reset ticket per the instructions, but it’s not clear how to proceed with the email template per the “Create email template” section. There doesn’t seem to be a way to send an email using the API. Any help would be appreciated.

1 Like

Hey there!

That’s a good question, let me research that and get back to you as soon as I have news to share!

1 Like

I’m still waiting on the response from the docs team on that. I’ll get back to you as soon as I have it

1 Like

Thank you, I appreciate you looking into this matter and look forward to your solution.

No worries! We’re here for you!

Being able to Send emails via API is a need we also have for our Auth0 implementation. Has a solution been found?

There’s no info from the docs and product team yet. Let me follow-up on that

I ended up using another email provider. It would be nice if Auth0 worked as it is documented/advertised but after much digging this feature doesn’t seem to be supported.

We might have to do the same as joseph4. But we would like to not have to use an outside email provider for some emails.

Any update from the docs and product team yet?

As soon as I get any update from the team, I’ll make sure to relay it here

For the process outlined in the documentation, you have two options currently:

A.) Generate a password reset ticket URL, and append it to an email that you send yourself, be it via your email provider’s API or manually.

B.) Customise your Auth0 tenant’s password reset email template, so that the wording in the template makes sense to the end-user, such that it could be used for both an invite flow and a password reset flow, and then trigger the reset password flow via the change_password endpoint to send them the email via Auth0

As a side note, the Organizations feature has recently introduced an invite flow, but this currently cannot be used for anything other than inviting members to Organizations:

2 Likes

Hey - I’m unsure how we customize the password reset email given a hook that I have set up to change a password. I’m using this code to generate a hook - Authenticate and prompt user password change with a single email - #4 by Lee_Peters. But given the fact that email template is HTML and there isn’t a parameter that we can send in the authClient.requestChangePasswordEmail function call specifying that it is a set up, I’m confused on how to proceed/customize the template. Thanks

Hi Brando, welcome to the community!

I’m afraid you can’t send a parameter or similar to that endpoint to change the contents of the Password Reset email, instead if you are using Auth0’s email sending features only you would need to customise the template to play a dual role so the wording made sense to the end user from both an invite and a forgotten password flow, so you could send them the same email for both flows interchangeably.
If you want to have a completely separate email template, you would need to use your hook to send the email directly via your SMTP provider’s endpoints, or send it manually/automate the process externally when you created a new user.

2 Likes

This makes a ton of sense - thanks! For now, I’ve adjusted the wording actually in a welcome email to say that you will get a change password email which acts as setting a password for your account the first time you receive that email. I’ll think about going the SMTP provider solution possibly later but for now what you described works

1 Like

Thanks for helping on this one Steve! Let us know Brando once you have any further questions down the road feel free to ask!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.