Pergunta

We are working on an app with Google Calendar Integration for Google marketplace users. Many of the links in the documentation https://developers.google.com/google-apps/marketplace/best_practices is not working. Can anybody point me to work in 2-Legged OAuth with RESTful Google Calendar API V3 for marketplace users? TIA, Riyaz .A

Nenhuma solução correta

Outras dicas

Download the below library it supporting 2legged oauth

google-api-python-client==1.0beta4

and make sure your manifest contains updated calendar(v3) scopes then

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()
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top