title: Listrak Invalid Credentials error using Python requests_oauthlib
body: <p>Trying to get a valid response from the Listrak API using requests_oauthlib and all I ever get is Invalid Credentials. Have attempted to reset the keys but same issue. Code is as follows, &lt;> sections replaced with actual keys in my code:</p>
  
  <pre><code>#Imports
  import requests
  import requests_oauthlib
  from oauthlib.oauth2 import BackendApplicationClient
  
  #Keys
  id = &lt;client_id&gt;
  secret = &lt;client_secret&gt;
  #Token URL
  token_url = 'https://auth.listrak.com/OAuth2/Token'
  
  #Auth Request
  client = BackendApplicationClient(client_id=id)
  oauth = requests_oauthlib.OAuth2Session(client=client)
  token = oauth.fetch_token(
      token_url=token_url, client_id=id, client_secret=secret)
  </code></pre>
  
  <p>Debugging log:</p>
  
  <pre><code>2019-12-09 13:31:27,014 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Encoding `client_id` "&lt;client_id&gt;" with `client_secret` as Basic auth credentials.
  2019-12-09 13:31:27,014 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Requesting url https://auth.listrak.com/OAuth2/Token using method POST.
  2019-12-09 13:31:27,014 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Supplying headers {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'} and data {'grant_type': 'client_credentials'}
  2019-12-09 13:31:27,014 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Passing through key word arguments {'timeout': None, 'auth': &lt;requests.auth.HTTPBasicAuth object at 0x03EBC5F8&gt;, 'verify': True, 'proxies': None}.
  2019-12-09 13:31:27,014 - urllib3.connectionpool - DEBUG - 4396 - Starting new HTTPS connection (1): auth.listrak.com:443
  2019-12-09 13:31:27,217 - urllib3.connectionpool - DEBUG - 4396 - https://auth.listrak.com:443 "POST /OAuth2/Token HTTP/1.1" 400 31
  2019-12-09 13:31:27,217 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Request to fetch token completed with status 400.
  2019-12-09 13:31:27,217 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Request url was https://auth.listrak.com/OAuth2/Token
  2019-12-09 13:31:27,217 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Request headers were {'User-Agent': 'python-requests/2.22.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Content-Length': '29', 'Authorization': 'Basic emludWp1YnEzczdibHc4dmRrMDY6SGgwQWIyZkJZWWcvLzVZMTF1M1djWGpZWFpLWWpzVFNxTW83ckNteDBScw=='}
  2019-12-09 13:31:27,217 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Request body was grant_type=client_credentials
  2019-12-09 13:31:27,217 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Response headers were {'Server': 'Microsoft-IIS/8.5', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json;charset=UTF-8', 'Date': 'Mon, 09 Dec 2019 19:31:26 GMT', 'Expires': '-1', 'Pragma': 'no-cache', 'Connection': 'close', 'X-Powered-By': 'ASP.NET', 'Content-Length': '31'} and content {"error":"Invalid Credentials"}.
  2019-12-09 13:31:27,217 - requests_oauthlib.oauth2_session - DEBUG - 4396 - Invoking 0 token response hooks.
  </code></pre>
  
  <p>I notice in line four the "auth" argument looks like <code>'auth': &lt;requests.auth.HTTPBasicAuth object at 0x03EBC5F8&gt;</code> which seems strange to me. Seems like that should have some values? Any advice at all greatly appreciated.</p>