I'm developing a site connected with Google Calendar. This site uses Google's JavaScript API to retrieve events of a public calendar and render them on the website. I'm now able to create new events, update events and remove events from my site and be updated with no problem in the Google Calendar.
If I'm able to edit this calendar information is because my Google account has read/write permission on this particular calendar.
My question: is there a way to add users to the list of accounts that have writing permission for this calendar using the JavaScript API? Obviously I don't want to manually add the emails of each account on the calendar settings page.
What can I do? Do I need to make an ACL rule insert (not much documentation on this for JavaScript) or something like that?
Using Acl: insert you can add a user with "writer" or "owner" permissions, which grant the user read and write permissions to your calendar.
Using the API Explorer on that same page I was able to successfully make this request:
You can use it with the Google API Javascript client like this: