我们正在为谷歌市场的用户与谷歌日历集成的应用程序。documentation https://developers.google.com/google-apps/marketplace/best_practices中的许多链接都不起作用。有没有人能为市场用户推荐使用带有RESTful Google Calendar API V3的两条腿的OAuth?TIA,Riyaz .A
发布于 2013-10-03 18:09:38
下载下面的库,它支持两条腿的oauth
google-api-python-client==1.0beta4
并确保您的清单包含更新的日历(V3)作用域
from apiclient.oauth import TwoLeggedOAuthCredentials
from apiclient.discovery import build
import httplib2
credentials = TwoLeggedOAuthCredentials(OAUTH_CONSUMER_KEY,OAUTH_CONSUMER_SECRET,'referer')
credentials.requestor = user_email
http = httplib2.Http()
http = credentials.authorize(http)
calendar_service = build('calendar', 'v3', http=http)
list = calendar_service.events().list(calendarId="primary").execute()https://stackoverflow.com/questions/17171243
复制相似问题