title: Otp Verification in laravel
body: <p>I'm trying to get Otp verification system in my laravel app 
  but 
  It shows me page expired when i enter my number to get the otp.(Have provided Code and Screenshot "Page Expired")</p>
  
  <p>Using MSG91 </p>
  
  <p>code...</p>
  
  <pre><code> &lt;div class="container"&gt;
          &lt;div class="jumbotron"&gt;
              &lt;h1&gt;OTP&lt;/h1&gt;
              &lt;div class="card"&gt;
                  &lt;div class="card-body"&gt;
                      &lt;div class="col-md-6"&gt;
  
                          &lt;form action="{{url('/')}}/dashboard" method="POST"&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label for="exampleInputPassword1"&gt;Mobile Number&lt;/label&gt;
                              &lt;input type="number" class="form-control" id="number" name="number" placeholder="Enter Mobile Number"&gt;
                          &lt;/div&gt;
                          &lt;button type="submit" name="sendotp" class="btn btn-success"&gt;Send OTP&lt;/button&gt;
  
                          &lt;/form&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;?php
  
  
          $authKey = "auth...Key...here";
          $senderId = "Id here";
  
          if (isset($_POST['sendotp'])){
  
              $mobileNumber = $_POST['number'];
  
              $message = 'Your Verification Code id ######';
  
              $postData = array(
                'authKey' =&gt; $authKey,
                'mobiles' =&gt; $mobileNumber,
                'message' =&gt; $message,
                'sender' =&gt; $senderId,
              );
  
              $url ="http://control.msg91.com/api/sendotp.php";
  
              $curl = curl_init($url);
  
              curl_setopt_array($curl, array(
                  CURLOPT_URL =&gt; "https://api.msg91.com/api/v5/otp?invisible=1&amp;otp=OTP%20to%20send%20and%20verify.%20If%20not%20sent%2C%20OTP%20will%20be%20generated.&amp;userip=IPV4%20User%20IP&amp;authkey=Authentication%20Key&amp;email=Email%20ID&amp;mobile=Mobile%20Number&amp;template_id=Template%20ID&amp;otp_length=&amp;otp_expiry=",
                  CURLOPT_RETURNTRANSFER =&gt; true,
                  CURLOPT_ENCODING =&gt; "",
                  CURLOPT_MAXREDIRS =&gt; 10,
                  CURLOPT_TIMEOUT =&gt; 30,
                  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
                  CURLOPT_CUSTOMREQUEST =&gt; "POST",
                  CURLOPT_POSTFIELDS =&gt; $postData,
                  CURLOPT_SSL_VERIFYHOST =&gt; 0,
                  CURLOPT_SSL_VERIFYPEER =&gt; 0,
                  CURLOPT_HTTPHEADER =&gt; array(
                      "content-type: application/json"
                  ),
              ));
  
              $response = curl_exec($curl);
              $err = curl_error($curl);
  
              curl_close($curl);
  
              if ($err) {
                  echo "cURL Error #:" . $err;
              } else {
                  echo $response;
              }
  
          }
  
  ?&gt;
  </code></pre>
  
  <p>error..
  <a href="https://i.stack.imgur.com/Ou7cx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ou7cx.png" alt="enter image description here"></a></p>
  
  <p>Please let me know where is my error....
  and also let me know which is the best way to add OTP verification in laravel using MSG91</p>
  
  <p>Thank You</p>