title: How to access datahug API via HTTP Authentication?
body: <p>In <a href="https://api.datahug.com/" rel="nofollow">Datahug's documentation</a>, it states, 'Authentication is performed using HTTP Basic Authentication - A Datahug username and password will be required in order to access the API.'</p>
  
  <p>As a result, I've tried the below (with my username and password defined)</p>
  
  <pre><code>import requests
  from requests.auth import HTTPBasicAuth
  
  url = 'https://api.datahug.com/Contact/'
  l = requests.get(url,auth=HTTPBasicAuth(username,password)
  </code></pre>
  
  <p>But I receive the following error:</p>
  
  <pre><code>&lt;Response [401]&gt;
  </code></pre>
  
  <p>Am I doing something wrong here?</p>
  
  <p>I've also tried the following:</p>
  
  <pre><code>import requests
  from requests.auth import HTTPBasicAuth
  
  url = "https://api.datahug.com/Contact/test@test.com"
  l = requests.get(url,auth=(username,password))
  </code></pre>