title: How to connect to and keep the session alive using python requests
body: <p>I am trying to login to a site, and then view user details.</p>
  
  <p>The API documentation from the site is:</p>
  
  <pre><code>LogOn : All Calls with JSON and return JSON type
  
  post - https://www.bit2c.co.il/Account/LogOn  {UserName:'',Password:'',SecondFactor:[optional]} 
  return true if OK , error list of strings if not
  
  Balance - GET https://www.bit2c.co.il/Account/Balance
  return UserBalance as JSON  
  </code></pre>
  
  <p>I've tried connecting to the site using</p>
  
  <pre><code>import requests
  session=requests.session()
  session.auth = ("username", "pass")
  session.post("https//www.bit2c.co.il/Account/Balance")
  </code></pre>
  
  <p>but i am getting response 200 and the response content is "you must login".</p>
  
  <p>What am I doing wrong ?</p>