title: Python POST requests returns 401
body: <p>When send the post request it returns a 401 error.   Is there anything in the setup that might be causing the error.  Here is the code:</p>
  <pre><code>import requests
  
  
  &gt;&gt;&gt;url= 'https://us-street.api.smartystreets.com/street-address'
  &gt;&gt;&gt;payload = {'auth-id':'xxxxxx','auth-token':'xxxxx'}
  &gt;&gt;&gt;body = [{&quot;street&quot;:&quot;1 Santa Claus&quot;,&quot;city&quot;:&quot;North Pole&quot;,&quot;state&quot;:&quot;AK&quot;,&quot;candidates&quot;:10},{&quot;addressee&quot;:&quot;Apple Inc&quot;,&quot;street&quot;:&quot;1 infinite loop&quot;,&quot;city&quot;:&quot;cupertino&quot;,&quot;state&quot;:&quot;CA&quot;,&quot;zipcode&quot;:&quot;95014&quot;,&quot;candidates&quot;:10}]
  &gt;&gt;&gt;headers = {'Content-Type':'application/json; charset=utf-8', 'Host':'us-street.api.smartystreets.com'}
  &gt;&gt;&gt;r = request.post(url, data=payload, json=body, headers=headers)
  &gt;&gt;&gt;r.status_code
  401
  &gt;&gt;&gt;r.url
  https://us-street.api.smartystreets.com/street-address
  </code></pre>
  <p>Any help would be appreciated.
  Link to api documentation: <a href="https://smartystreets.com/docs/cloud/us-street-api" rel="nofollow noreferrer">https://smartystreets.com/docs/cloud/us-street-api</a></p>