# OTP based SMS Configuration

An OTP sent via SMS to the user’s registered mobile number is one of the most secure and efficient ways to authenticate users for specific transactions. For example, if a user wants to reset the password, configure the text message to be sent via SMS along with the generated OTP in Keycloak. To configure the text messages, complete the following steps:

1. Enter your Username or email and Password
2. Click Log in to log into the Keycloak admin console

<figure><img src="https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2FW0z0w1BnNEqeLyJsCU75%2Fkeycloak_login.png?alt=media&#x26;token=53942b3a-d3dd-4736-89e0-5a2941189510" alt=""><figcaption></figcaption></figure>

3\. Click the Realm Selector dropdown from the navigation pane and select an appropriate realm Note: The Master realm is selected by default.

<figure><img src="https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2FUWM5v9GlhSt3gLcFVUKA%2Frealm_select.png?alt=media&#x26;token=94ca422f-317e-4c24-b9c2-565f24281f6a" alt=""><figcaption></figcaption></figure>

4\. Go to the Configure section and select the Authentication tab.

<figure><img src="https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2F6RFbsEIjzPeMLjmSSk3Z%2Fselectauthenticationsection.png?alt=media&#x26;token=ad55545d-d1d2-4945-b5be-1b9d2895337b" alt=""><figcaption></figcaption></figure>

5\. Go to the Flows tab, select Reset Credentials With SMS OTP option from the drop-down list.

<figure><img src="https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2FHSOkcu2fPBkWsWpoLqSK%2Fselectflows.png?alt=media&#x26;token=682ae0dd-9974-49d7-9992-9410c9b81304" alt=""><figcaption></figcaption></figure>

6\. Select Actions as *Config* for SMS Authentication (Reset credentials with SMS OTP).

<figure><img src="https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2F7aXRAwQ3dg1rg22PJZeb%2Fselectconfig.png?alt=media&#x26;token=9b6364ee-65fd-4c2d-a0c0-1aaa690e3f90" alt=""><figcaption></figcaption></figure>

7\. Change the text for Template of text to send to the user with the actual text of the message to be sent to users while sending the OTP SMS.

<figure><img src="https://308610995-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ZKyfmmhMWpPkD6iYvKF%2Fuploads%2Fiz8mzGdXxp2Zu3R1pJbm%2Fchangesmsotp.png?alt=media&#x26;token=11ec6835-e5c2-44ec-a7d8-8cfe45066d88" alt=""><figcaption></figcaption></figure>
