为什么会:
events = calservice.events().list(calendarId='CAL_ID@group.calendar.google.com', singleEvents='true', showDeleted='false', timeMin='{:%Y-%m-%dT%H:%M:%SZ}'.format(now), timeMax='{:%Y-%m-%dT%H:%M:%SZ}'.format(nowplusonemin)).execute(http=decorator.http())
https://www.googleapis.com/calendar/v3/calendars/CAL_ID@group.calendar.google.com/events?timeMax=2013-06-12T11%3A04%3A09Z&showDeleted=true&alt=json&singleEvents=true&timeMin=2013-06-12T11%3A03%3A09Z
工作并返回所请求查询的事件,但是:
calendar_list = calservice.calendarList().list(pageToken=page_token).execute()
给我一个Login Required错误:
<HttpError 401 when requesting https://www.googleapis.com/calendar/v3/users/me/calendarList?alt=json returned "Login Required">
SCOPE应该让我访问我相信的两个:
SCOPE='https://www.googleapis.com/auth/calendar'
答案 0 :(得分:1)
所以我错过了execute()中的http = decorator.http()。