The entire Google facing side of the application is written in .NET.
I am trying to use a service account created by an admin account to create events on a resource. I am able to create events and specify any parameter except for attendees.
A couple notes:
- We have a g suite license and are well within our quota.
- The service account has write access to the calendar.
- I have tried only adding attendees within my own domain and this does not fix the problem.
- I have tried not sending email notifications and get the same response.
- All events are being added to the same calendar.
- Requests with no attendees work completely fine.
- I've seen this page: https://support.google.com/a/answer/2905486?hl=en and assumed that I just needed to let my requests refresh. However, after waiting out the weekend I came back and still got the error message.
- When the message persisted I created a new project in the google developer console with a new service account. This project was also made using a different email (this email belonged to an admin) under the same domain. The first request on the project resulted in the same error.
- The original project made ~500 requests over the course of 3 days during testing. Most of these requests were made in a javascript application. I was able to add attendees in these events. I eventually switched the requests to the backend with a service account and have yet to be able to add attendees since then.
This is the code I am using to generate the Event. Get Attendees just returns a list of EventAttendees for each email in a list.
var attendees = GetAttendees(request.Emails);
var googleEvent = new Event()
{
Summary = request.Title,
Location = request.Location,
Description = request.Description,
Start = new EventDateTime()
{
DateTime = request.MeetingDate,
TimeZone = "America/Chicago"
},
End = new EventDateTime()
{
DateTime = request.EndTime,
TimeZone = "America/Chicago"
},
Attendees = attendees
};
Executing any request with attendees results in the following response:
{
"error": "Google.Apis.Requests.RequestError\r\nCalendar usage limits exceeded. [403]\r\nErrors [\r\n\tMessage[Calendar usage limits exceeded.] Location[ - ] Reason[quotaExceeded] Domain[usageLimits]\r\n]\r\n",
"exception": {
"ServiceName": "calendar",
"Error": {
"Errors": [
{
"Domain": "usageLimits",
"Reason": "quotaExceeded",
"Message": "Calendar usage limits exceeded.",
"LocationType": null,
"Location": null
}
],
"Code": 403,
"Message": "Calendar usage limits exceeded."
},
"HttpStatusCode": 403,
"Message": "Google.Apis.Requests.RequestError\r\nCalendar usage limits exceeded. [403]\r\nErrors [\r\n\tMessage[Calendar usage limits exceeded.] Location[ - ] Reason[quotaExceeded] Domain[usageLimits]\r\n]\r\n",
"Data": {},
"InnerException": null,
"StackTrace": " ..."
},
"type": "Google.GoogleApiException"
}