This is a follow on from my thread about a 401 error when using the Google Calendar API and OAuth2, which can be found here
This contains details of the account setu
Solved, thanks to this post.
You have to share the calendar from your Google Calendar account with the Service Account email that is generated in the Google API Console, e.g. 284XXXXXXXX@developer.gserviceaccount.com.
I can now update my calendar from my web service.
I was also getting the same error even after sharing the calendar as in the Justin's answer. After comparing with another working sample figured out that I have set
var SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"];
instead of
var SCOPES = ["https://www.googleapis.com/auth/calendar"];
Hope this helps anyone who has done a similar mistake and getting this error.
In my case I had to enable the CalDAV API in the Google API console. It gives a 403 response if disabled.
I know this is an old question, but this might be helpful for someone.