Email sent although verify_email field is false

Hi,

We are sending a POST request to create a new user (create user doc.
We are receiving the verification email although the verify_email field is false, both through postman and programmatically.
To give some context - we want to create a user in Auth0 and later verify his email.
Could you please advise?

The request:


/api/v2/users
{
  "connection": "email",
  "email": "someEmail@gmail.com",
  "name": "someone",
  "user_metadata": {},
  "email_verified": **false**,
  "verify_email": **false**,
  "app_metadata": {}
}

Thanks

Hi @ron.p,

Welcome to the Auth0 Community!

By default, a verification email gets sent to every user with the email_verified property set to false.

Moreover, if you plan to create users and send the verification email at a later time, please see this doc to learn more on customizing the email verification flow.

Please let me know if you have any questions.

Thank you.

Hi @rueben.tiow
Thanks for the quick reply.
My intention is to create a user with email_verified false and not send the verification email.
According to the API documentation:

“Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of email_verified parameter.”

image

What is the correct way to achieve my intention above?

Thank you

Hi @ron.p,

Thank you for your response and clarification.

For this scenario, there is the option to create the user with the verify_email: false property to prevent the verification email from being sent to them.

Alternatively, you could disable the Verification Email template on your Auth0 Dashboard > Branding > Email Templates > Verification Email (using Link). This will prevent any Verification Emails from being sent to a newly created user.

Then, at a future time, you can create an email verification ticket by calling the Management API Create an email verification ticket endpoint and sending it to the user to verify their email addresses.

Hoped this helps!

Thank you.

Hi @rueben.tiow,
Thanks for the comment.

Regarding your comment above, does that solve also the SMS verification? Is there a dedicated endpoint for that?

Regarding my original question, is email_verify supposed to work and this is a bug?

Thanks

1 Like

Hi @ron.p,

Thank you for your reply.

Unfortunately, there isn’t an endpoint for SMS verification. Moreover, you can only verify users with their email addresses.

After testing, I did not find the same observations as you. Instead, I could create a new user with the email_verify: false property that prevented the email verification from being sent to them.

Please let me know if you have any further questions

Thank you.