# OKTA - How to show Registration inline Webhook deny response error message in browser language (English/French)?

**URL:** <https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302>\
**Category:** Questions\
**Tags:** hooks, ssr\
**Created:** [September 11, 2025, 4:23pm UTC](https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302 "2025-09-11T16:23:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravinumboori](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@ravinumboori](https://devforum.okta.com/u/ravinumboori)\
**Post date:** [September 11, 2025, 4:23pm UTC](https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302/1 "2025-09-11T16:23:39Z")

</div>

I am redirecting my application users to the Okta login page for authentication.

Recently, I enabled **User Self-Registration** and implemented an **Okta Registration inline Webhook** that calls my application’s API to confirm to allow or deny the registration. The application API responds with either **allow** or **deny** , and in the deny case, it includes an error message.

Since my application is used by both **Canada English** and **Canada French** users, I would like the registration deny error message that is received form my API to appear in the **language as the user’s browser** language in the Okta registration form UI.

Currently, Okta is already displaying its own UI labels and text in the browser language, but for the **Registration Webhook deny case** , I want to return localized error messages.

**Question:**

- Is there a way to get the **language code** (e.g., `en-CA` / `fr-CA`) from the Registration inline Webhook request to my API? OR any other alternative way? so that I can give error message in that language from my API response.

- Or Can I send both language error messages with i18n param set into the registration inline webhook response like how we customize the signin widget errors?

- OR any other solution?

---

<div class="post-metadata">

**Author:** ![stephval](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@stephval](https://devforum.okta.com/u/stephval)\
**Post date:** [September 12, 2025, 2:22pm UTC](https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302/2 "2025-09-12T14:22:12Z")

</div>

Thank you for reaching out here on the Okta Developer Forum. We noticed that your question is more closely related to [topic/issue/domain]. To ensure you receive the most accurate and timely assistance, we recommend reposting your query on Okta’s Community at: [Okta Help Center (Lightning)](https://support.okta.com/help/s/community)

Okta’s teams on the Community are better equipped to provide the comprehensive support and guidance you need as they have the specialised knowledge and expertise in [topic/issue/domain].

We appreciate your understanding and are committed to ensuring you receive the best possible support. If you have any other questions or issues related to Okta’s developer tools and API’s, feel free to post them here, and we’ll be happy to assist!

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [September 12, 2025, 7:12pm UTC](https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302/3 "2025-09-12T19:12:26Z")

</div>

I wonder if you could just add a language attribute to the User Profile and the User Profile Enrollment policy so that the user has to select their language during registration. Then when your endpoint receives the registration request, it can know in which language the error should be returned.

---

<div class="post-metadata">

**Author:** ![ravinumboori](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@ravinumboori](https://devforum.okta.com/u/ravinumboori)\
**Post date:** [September 15, 2025, 9:25am UTC](https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302/4 "2025-09-15T09:25:22Z")

</div>

Thank you @andrea for the update. I was initially looking to see if the OKTA Registration hook natively supports error messages in different languages, but I found that this is not possible.

As you mentioned, I wanted to add a new attribute to the OKTA default user profile and update the enrollment policy. However, I noticed that a default attribute called **“preferredLanguage”** already exists in the OKTA user profile.

So, I changed the attribute setting from _Read-only_ to _Read/Write_ and then updated the user enrollment policy, which made the **Preferred Language** input field appear in the registration form UI. Since I didn’t want customers to manually provide this value, I customized the Sign-In Page code to detect the browser language using JavaScript, set the field programmatically with that value, and hid the field in the UI.

After testing, everything is working as expected. Thank you again for your solution.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [October 15, 2025, 9:26am UTC](https://devforum.okta.com/t/okta-how-to-show-registration-inline-webhook-deny-response-error-message-in-browser-language-english-french/34302/5 "2025-10-15T09:26:10Z")

</div>

Closed on October 15, 2025, 9:26am UTC

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