# How to customize the error message when siup up an email which already exists?

**URL:** <https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189>\
**Category:** Get Help\
**Tags:** error, signup, auth0\
**Created:** [August 22, 2022, 5:34pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189 "2022-08-22T17:34:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicky.tseng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicky.tseng/32/33226_2.png) [@nicky.tseng](https://community.auth0.com/u/nicky.tseng)\
**Post date:** [August 22, 2022, 5:34pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/1 "2022-08-22T17:34:00Z")

</div>

Hi,  
I am trying to customize the error message.  
The use case is “sign up an email which already exists”.

I can get the message “The user already exists.” in the monitoring logs in Dashboard.

 ![Screen Shot 2022-08-23 at 01.23.44](https://global.discourse-cdn.com/auth0/original/3X/9/b/9ba6d93ebafb304c4db55c83f59b67ff5fe45166.png)

And also I get the message “Something went wrong, please try again later.” in the runtime UI.

 ![Screen Shot 2022-08-18 at 15.18.34](https://global.discourse-cdn.com/auth0/original/3X/4/d/4d8e1e1ec004aab5b0e78428b9083090a9e54ded.png)

Currently, I cannot find a way to customize the error message (“Something went wrong, please try again later.”) with either Rules, Hooks, or Actions.  
Could you help show me how to do it.  
Thanks.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [August 22, 2022, 8:49pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/3 "2022-08-22T20:49:26Z")

</div>

Hi @nicky.tseng ,

Welcome to the Auth0 Community!

We can customize the error message in the signup page with the Auth0 Management API endpoint

```auto
PUT https://{your domain}/api/v2/prompts/signup/custom-text/en

{
    "signup":{
        "auth0-users-validation":"your customized error message"
    }
}

```

This is how it looks after sending the request.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/4/342469d283ad26a680fe8a7324952a4cf040217d.jpeg)

Reference:

> **[Customize New Universal Login Text Prompts](https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts)**
>
> Learn how to customize text prompts using the API for the New Universal Login Experience.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![nicky.tseng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicky.tseng/32/33226_2.png) [@nicky.tseng](https://community.auth0.com/u/nicky.tseng)\
**Post date:** [August 23, 2022, 3:56am UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/4 "2022-08-23T03:56:08Z")

</div>

Hi @lihua.zhang ,

Thanks a lot, it works now.  
Now I have one more question:

Why not the error message shows signup.“email-in-use” instead of signup.“auth0-users-validation” since the monitoring log has indicated “The user already exists”?

 ![Screen Shot 2022-08-23 at 11.49.11](https://global.discourse-cdn.com/auth0/original/3X/0/a/0aedecc4347f628f0ba5147cab0eac3f3dbcee35.png)  
 ![Screen Shot 2022-08-23 at 11.54.01](https://global.discourse-cdn.com/auth0/original/3X/9/7/9777822bd84aaf775f6e33f99261344f30a7f216.png)  
 ![Screen Shot 2022-08-23 at 01.23.44](https://global.discourse-cdn.com/auth0/original/3X/9/b/9ba6d93ebafb304c4db55c83f59b67ff5fe45166.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [August 23, 2022, 3:48pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/5 "2022-08-23T15:48:24Z")

</div>

Hi @nicky.tseng ,

The text of the message determines which key to use when customizing the text prompt. As shown below, for “Something went wrong, please try again later”, there are two keys. Since this is due to user validation, we use the key `auth0-users-validation`.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/0/2/027a694e8f352e05fe11ed13b0cb2ba63a2809cc.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/7/7/770fb4e6f78e1eaf200d9b2c6aae5175f121e55e.png)

Does that answer your question?

---

<div class="post-metadata">

**Author:** ![nicky.tseng](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicky.tseng/32/33226_2.png) [@nicky.tseng](https://community.auth0.com/u/nicky.tseng)\
**Post date:** [August 24, 2022, 2:05am UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/6 "2022-08-24T02:05:04Z")

</div>

Hi @lihua.zhang ,

Thanks for your quick response and help!

What I mean is the actual use case meets the key `email-in-use` (The user already exists.).  
I think Auth0 should return `email-in-use` in this case, not `auth0-users-validation`.

If Auth0 returns the key `email-in-use` (The user already exists.), then I don’t need to customize the message of `auth0-users-validation`.

Note:  
The use case: sign up an email which already signed up before.  
The Dashboard \> Monitoring Log indicates Auto0 can catch the actual error: `The user already exists.`.

 ![Screen Shot 2022-08-23 at 01.23.44](https://global.discourse-cdn.com/auth0/original/3X/9/b/9ba6d93ebafb304c4db55c83f59b67ff5fe45166.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [August 24, 2022, 4:57pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/7 "2022-08-24T16:57:06Z")

</div>

Hi @nicky.tseng ,

I understand your concerns. Please feel free to communicate this directly to our product team using our [feedback page](https://auth0.com/feedback). Thank you!

---

<div class="post-metadata">

**Author:** ![yodude](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yodude/32/34006_2.png) [@yodude](https://community.auth0.com/u/yodude)\
**Post date:** [August 30, 2022, 9:17pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/8 "2022-08-30T21:17:30Z")

</div>

Thanks @lihua.zhang .

`auth0-users-validation` seems to be pretty broad. Is it possible that another validation error happens that is not related to username taken? If so, then whatever custom message we assign for that key will be wrong in some cases.

Looks like there’s already already a `username-taken` key. Why not return that key instead in the case trying to sign up with a user name that is already taken? In fact, looks like there is already an appropriate default error message associated with it, “The username provided is in use already.” Why wasn’t this used? That seems to be the way it should work by default.

![auth0-username-taken](https://global.discourse-cdn.com/auth0/original/3X/6/4/64a43bee77045740a5a34e69828825f7b1c0d608.png)

---

<div class="post-metadata">

**Author:** ![yodude](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yodude/32/34006_2.png) [@yodude](https://community.auth0.com/u/yodude)\
**Post date:** [September 8, 2022, 4:35am UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/9 "2022-09-08T04:35:25Z")

</div>

@lihua.zhang @nicky.tseng

I found the answer. There actually is a toggle to display the user already exists message:

> [@Show "User already exists" error on Sign Up?](https://community.auth0.com/t/show-user-already-exists-error-on-sign-up/55192/7):
>
> Hi @ant Under Tenant Settings → Advanced there is “Use a generic response in public signup API error message”. If you disable this it will return the type of error message that can open you up to user enumeration attacks. I think Lock will display the returned message by default but you might need to do a small amount of work to get it working. Please let me know if you run into problems with that.

It does exactly what I’m looking for:

![user-already-exists](https://global.discourse-cdn.com/auth0/original/3X/0/6/063b84fe217f952ee31d6d62ce76fd08de26ea5b.png)

This is with the new universal login page btw. Didn’t have to modify the template. It just worked. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 2, 2023, 8:27pm UTC](https://community.auth0.com/t/how-to-customize-the-error-message-when-siup-up-an-email-which-already-exists/89189/10 "2023-02-02T20:27:05Z")

</div>

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