title: Twilio: Rest API - Send Message - How to get message sid?
body: <p>I want to send MMS using <code>Twilio REST API</code>. The message was sent successfully However, I am not able to get the unique <code>MessageSid</code> of the sent message.</p>
  
  <p>I have already tried with <code>$result-&gt;sid</code> and  <code>$result-&gt;messageSid</code>. </p>
  
  <p><strong>Current Code</strong></p>
  
  <pre><code>$result= $client-&gt;account-&gt;messages-&gt;create(
      $to, array('from' =&gt; $from,
                 'body' =&gt; $message,
                 'mediaUrl' =&gt; $mediaurl
                ));               
  
  if (isset($result-&gt;messageSid))
      return $result-&gt;messageSid;
  else
      return "";
  </code></pre>
  
  <p>Is there anything i am doing wrong ?</p>