title: How to authenticate calls to Piranha.WebApi?
body: <p>I'm tasked to provide the excellent Piranha CMS through an API that other UI projects will consume. Piranha docs say it's designed to run "headless" for this purpose, but not many details on how. </p>
  
  <p>I've got the Piranha.WebApi project running, and it serves JSON content of pages as I expect. Currently, it works only when I access it from a browser, because any call to the WebApi prompts for credentials. Once I sign in, the WebApi calls succeed and I can make multiple calls from the same browser. </p>
  
  <p>Now I need to know how other UI code projects can authenticate when calling the WebApi so they can get results. </p>
  
  <p>I've reviewed the links I could find; no good hints yet:</p>
  
  <ul>
  <li><a href="https://piranhacms.org/blog/techniques-for-securing-pages" rel="nofollow noreferrer">https://piranhacms.org/blog/techniques-for-securing-pages</a>   </li>
  <li><a href="https://github.com/PiranhaCMS/piranha.core/issues/841" rel="nofollow noreferrer">https://github.com/PiranhaCMS/piranha.core/issues/841</a></li>
  <li><a href="https://github.com/PiranhaCMS/piranha.core/issues/546" rel="nofollow noreferrer">https://github.com/PiranhaCMS/piranha.core/issues/546</a></li>
  </ul>
  
  <p>Any suggestions will be very helpful!</p>