I want to use Google Calendar API in my Django web app.
I successfully got the access token using python social auth.
Using that token, I tried calling list calendar API with python requests.
Below is my code:
import requests
token = ...
endpoint = "https://content.googleapis.com/calendar/v3/users/me/calendarList"
headers = {
"Authorization":"Bearer " + token,
}
requests.get(endpoint,headers=headers).json()
However, I got the following response:
u'error':
u'code': 403,
u'message': u'Insufficient Permission',
u'errors':
u'domain': u'global',
u'message': u'Insufficient Permission',
u'reason': u'insufficientPermissions'
How can this be solved? I really want to solve this problem without using any other libraries including API Client Library.