I have a google calendar that I have set up as public, I want to build a web app so that anyone can see the availabilities and can insert an event. I am using javascript, the retrieving of the availabilities works fine, I have followed this link https://developers.google.com/calendar/quickstart/js I am stuck at the insert' I want to be able to insert event, without any authentication, how can I do that ? here is my code:
function insert() {
var event = {
'summary': 'Google I/O 2015',
'location': '800 Howard St., San Francisco, CA 94103',
'description': 'A chance to hear more about Google\'s developer products.',
'start': {
'dateTime': '2020-01-28T09:00:00-05:00'
'timeZone': 'America/Los_Angeles'
},
'end': {
'dateTime': '2020-01-28T10:00:00-05:00'
'timeZone': 'America/Los_Angeles'
},
// 'recurrence': [
// 'RRULE:FREQ=DAILY;COUNT=2'
// ],
'attendees': [
{'email': Email@example.com'}
],
'reminders': {
'useDefault': false,
'overrides': [
{'method': 'email', 'minutes': 24 * 60},
{'method': 'popup', 'minutes': 10}
]
}
};
var request = gapi.client.calendar.events.insert({
'calendarId': 'myCalendarID',
'resource': event
});
request.execute(function(event) {
appendPre('Event created: ' + event.htmlLink);
});
}
Thanks