title: How do I pass credentials to Sonar API calls?
body: <p>When I try to call:</p>
  
  <p><a href="https://sonar.mydomain.com/api/resources?resource=com.mydomain.project:MY&amp;metrics=ncloc&amp;format=json">https://sonar.mydomain.com/api/resources?resource=com.mydomain.project:MY&amp;metrics=ncloc&amp;format=json</a></p>
  
  <p>I get</p>
  
  <pre><code>{"err_code":401,"err_msg":"Unauthorized"}
  </code></pre>
  
  <p>How do I pass my credentials?</p>