title: Authentication using API Request
body: <p>I'm currently writing a short script using the Request API and I need to access my e-mail box in order to retrieve some information.</p>
  
  <p>So I wrote this code in order to authenticate:</p>
  
  <pre><code>#! /usr/bin/python3
  
  import requests
  
  payload = {'horde_user': '',
             'horde_pass': '',
             'login_post': '1'}
  
  
  r = requests.post('http://webmail.technion.ac.il/login.php', data=payload)
  
  print(r.status_code)
  print(r.text)
  </code></pre>
  
  <p>Obviously I replaced <code>horde_user</code> by my username and <code>horde_pass</code> by my password in the <code>payload</code> dictionary. </p>
  
  <p>But the output is the source code of the initial page, while I expected it to be the content of my mail box. </p>
  
  <p>And the status code is 200 while it is supposed to be 302. Could somebody explain to me what I'm doing wrong.</p>
  
  <p>Thanks a lot for helping!</p>