I need to write a program to insert events/appointments to users' calendar.

I saw an API to import *.ics but it requires user's credentials. Anyway to do it as an admin?