title: Uncaught exception ‘Twilio\Exceptions\TwilioException’ with message ‘Unknown domain sid’
body: <p>Hello everyone I trying to integrate  message Api Twilio in php . I did all things same as mentioned in Twilio Documentation but I'm getting error</p>
  
  <pre><code>Uncaught exception ‘Twilio\Exceptions\TwilioException’ with message ‘Unknown domain sid’
  </code></pre>
  
  <p>it is giving error on line 796</p>
  
  <pre><code>Twilio\Rest\Client-&gt;__get(‘sid’) #1 {main} thrown in /home/mydomain/public_html/twilio/Twilio/Rest/Client.php on line 796
  </code></pre>
  
  <p>Can Someone please suggest why I'm getting this error . If anyone want any other information please let me know.</p>
  
  <p>my Code how i trying to do this</p>
  
  <pre><code>$status = 'no';
  if (isset($_GET['mobile_no']) &amp;&amp; ! empty($_GET['mobile_no']))
  {
      $mobile_no  = $_GET['mobile_no'];
      $sql_result = "select * from users where user_id='" . $_SESSION['user_id'] . "' ";
  
      $result_user = mysqli_query($x, $sql_result);
  
      $details_user = mysqli_fetch_assoc($result_user);
  
      //$user_otp = rand(1000,9999);
      $user_otp    = mt_rand(100000, 999999);
      $msg         = "Your OTP for XYZ is:" . ' ' . $user_otp;
      $current_otp = hash('sha256', $user_otp);
  
      $sql111 = "update users set mobile_otp='$current_otp',mobile_status='0' where user_id='" . $_SESSION['user_id'] . "'";
      mysqli_query($x, $sql111);
      //use Twilio\Rest\Client; 
  
      $client-&gt;messages-&gt;create(
      // the number you'd like to send the message to
          $mobile,
          [
              // A Twilio phone number you purchased at twilio.com/console
              'from' =&gt; '+18154274419',
              // the body of the text message you'd like to send
              'body' =&gt; 'Sent from a Twilio Trial Account',
          ]
      );
  
      if ($client-&gt;sid)
      {
          $status = 'yes';
      }
  }
  echo $status;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>