I have an api to get, create event and update event too.. for now i want to get push notification for if any attendee accepted the event request or rejected it or did any modification to it. so i did followed the link https://developers.google.com/calendar/v3/push and wrote my code as follow. Want to know if i am going wrong somewhere. Here user_email is my calenderId. Still i am getting 400 or 401 status response saying authorization error
event_notification = {
"id": event['id'],
"type": "web_hook",
"address": "http://www.example.com/notifications"
}`enter code here`
url = "https://www.googleapis.com/calendar/v3/calendars/"+user_email+"/events/watch"
response = requests.post(url=url, data=json.dumps(event_notification), headers={"Content-Type":"application/json","Authorization":"I HAVE ENTERED THE ACCESS TOKEN OF CURRENT USER"})