Skip to content
Advertisement

Sending an otp to the input mobile number and verifying it, in my html page

I want my html page to send an OTP to the mobile number given in the input text, when I press Send OTP button. And upon giving the OTP as input I want my webpage to verify whether it’s the same OTP that was sent to the mobile. How do I achieve this?

This is my html code:

<html lang="en" dir="ltr">
   <head>
      <title>registration</title>
   </head>

   <body>
      
        <div class="registration_content">
            <h2 id="patient_status">status</h2>
            <p id="phone">Enter your contact number : <input type="tel" id="tel" placeholder="10 digit mobile number" style="font-family:cursive;"></input></p>
            <input id="register" type="button" value="Send OTP"></button>
            <span class="container"></span>

        </div>

        
   </body>
</html>

Advertisement

Answer

There’s an API called Fast2SMS. It’s extremely reliable for sending both bulk as well as OTP messages, and that too witout DLT registration ! Moreover, you also get a 55Rs credit upon signing up.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement