I try to create events for the users in my organization with a service account for which it is not needed that there is a reminder. Things like public holidays etc...
I add to the event a reminders object to override the default:
EventReminder[] reminderOverrides = new EventReminder[] {};
Event.Reminders reminders = new Event.Reminders()
.setUseDefault(false)
.setOverrides(Arrays.asList(reminderOverrides));
event.setReminders(reminders)
Unit test and functional tests show there are no reminders attached when I check from a service account.
However when I login with user credentials, the default reminders are still visible.
What do I need to do differently so that people are not disturbed early in the morning on a public holiday?
You can use reminders in Google Calendar to track tasks. Reminders repeat every day or until you mark them as done. Reminders are private and cannot be shared with others.
Anyone with full access permissions to your calendar will be able to: respond to invitations. create and edit events. share your calendar with others.
When using the service account you should be aware to impersonate the user and not use the admin account. When an event is created by the admin account the default settings are taken from the user calendar settings. But when you impersonate the user you can turn off the notifications.
From the rest API documentation:
It's possible to specify the email address of the user account with the setServiceAccountUser
method of the GoogleCredential
factory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With