Sending verification email without auth0 user_id

Hey guys,

I am wondering if anyone has an idea on how to send a verification email to a user using their email address in API?

Our use case is we are creating users from our end with few customizations on our DB and we are using auth0 with a custom database to verify their identity. Now I am able to send a change password email with API but for sending verify email, API requires user_id in body but since user is not there on auth0 we don’t have user id yet. Can anyone help me with the API which send verification mail with only email and connection as input?

Hi @vignesh.jeyaraman,

Thanks for reaching out to the Auth0 Community!

Unfortunately, it is not possible to send an email verification without specifying the user_id.

The user_id is a required parameter when calling either the Send an email address verification email or Create an email verification ticket endpoints in the Management API.

You could consider importing these users, which generates a user_id for them, and then send them an email address verification email.

See here to learn more about bulk importing users.

Alternatively, you could configure the Create Database Script and create the user through Auth0. Doing so will create the user in both Auth0 and your legacy databse and automatically generate the email address verification email after creating the user.

Please let me know if you have any further questions.

Thank you.

1 Like

Hello Rueben,

Thank you so much for the explanation. Actually in our case creating user require some non null field so it is not possible to create it via auth0.

Alternatively, is there any API which just create user on auth0 which already there in our custom database. I am aware of bulk import but I don’t want to go that way.

Hi @vignesh.jeyaraman,

Thank you for your response.

Unfortunately, if you create a user on Auth0 in the custom database, this will trigger the Create Database Action script mentioned earlier and create the user in both Auth0 and your legacy database. You will not be able to circumvent user creation on your legacy database.

However, you could consider creating the user on Auth0 with custom fields stored in the user_metadata and extract them into your legacy database.

Hoped this helps!

Thank you.