title: How to list all apps in cloudfoundry using python
body: <p>I am trying access my <code>CloudFoundry</code> apps in python and i am using <code>requests</code> module.<br>
  First I have tried<br></p>
  
  <pre><code>import requests
  response=requests.get("https://api.run.pivotal.io")
  </code></pre>
  
  <p>It is showing UnAuthorized error. for my knowledge First we have to get the token from authentication server. so I have used</p>
  
  <pre><code>response=requests.get('https://login.run.pivotal.io',auth=('username','pwd'))
  </code></pre>
  
  <p>It is successfull and getting response code 200. my doubt is how to get my apps data. I am trying</p>
  
  <pre><code>response=requests.get("https://api.run.pivotal.io/v2/apps",'Authorization':'access_token myToken')
  </code></pre>
  
  <p>but still getting UnAuthorized error. How to give <code>access token</code> in headers, because login url is different so that i am not able to access that.</p>