title: Build a REST API available to authorized apps only (like Facebook) with Laravel
body: <p>I'm building a REST API with Laravel and now I have an URL like</p>
  
  <pre><code>api.example.com/posts/3/comments
  </code></pre>
  
  <p>Now I'm wondering how to secure this API because as it's done now, anyone trying to make a <code>GET</code>, <code>POST</code>, ... request on this URL will get positive results.</p>
  
  <p>I want this API to be available to authorized apps only (like Facebook API). For now, those apps are just my website and my iOS app.</p>
  
  <p>I'm thinking about creating a table <code>applications</code> to store application's keys. But I don't know how to authenticate an app without publishing it key (which is obviously insecure).</p>
  
  <p>Any suggestion? Thank you.</p>