title: How to use Google calendar API with python
body: <p>I want to get the list of events from my calendar to my python program and i am not able to understand the massive documentation of oauth given my Google.</p>
  
  <p>This is the code i am trying. Its half bits and peices . can anyone help me fix this one</p>
  
  <pre><code>import gflags
  import httplib2
  
  from apiclient.discovery import build
  from oauth2client.file import Storage
  from oauth2client.client import OAuth2WebServerFlow
  from oauth2client.tools import run
  from oauth2client.client import flow_from_clientsecrets
  
  
  flow = flow_from_clientsecrets('client_secrets.json',
                                 scope='https://www.googleapis.com/auth/calendar',
                                 redirect_uri='http://example.com/auth_return')
  
  http = httplib2.Http()
  http = credentials.authorize(http)
  
  service = build(serviceName='calendar', version='v3', http=http,
         developerKey='AI6456456456456456456456456456yKhI')
  
  events = service.events().list(calendarId='645645654646a2cb4fl164564564@group.calendar.google.com').execute()
  print events
  </code></pre>
  
  <p>The thing is how can i get the credentials from my flow objects</p>
  
  <p>I have created a project in API console and added calendar API to it. Put those in clients.json.</p>
  
  <p>I don't want browser redirection and its my calendar which i want to acess. i don't want user to access their calendars but my calendar so that i can post my events on website.</p>
  
  <p>I don't know why do i have to use Oauth for acessing my calendar</p>