1

为什么会:

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()

给我一个需要登录的错误:

<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'
4

1 回答 1

1

所以我错过了execute()中的http=decorator.http()。

于 2013-06-12T13:43:04.707 回答