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.
This is the code i am trying. Its half bits and peices . can anyone help me fix this one
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='[email protected]').execute()
print events
The thing is how can i get the credentials from my flow objects
I have created a project in API console and added calendar API to it. Put those in clients.json.
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.
I don't know why do i have to use Oauth for acessing my calendar