title: Protecting my API
body: <p>I've created a website based on my API - so that my FrontEnd is decoupled from the backend using a simple REST API (frontend is pure javascript/html).</p>
  
  <p>I would like to protect the API from usage by anyone else - so that the calls can come from the website alone (or maybe allow other specific websites to use it).</p>
  
  <p>For now, if anyone would use <code>curl</code> he will be able to scrape the API very easily.</p>
  
  <p>How can I protect the API assuming the FrontEnd is JS/Html only, so that legitimate calls from my own pages work but <code>curl</code> and such from third parties do not?</p>