Shared calendar is not listed when using CalendarApp.getAllCalendars() but found and accessible when using CalendarApp.getCalendarById()
Is there any reason why specific calendar would not be listed when using CalendarApp.getAllCalendars() ?
Example:
var cal = CalendarApp.getCalendarById( calendar ID );
Logger.log( cal.getName() );
var myCalendars = CalendarApp.getAllCalendars();
for( var q = 0 ; q < myCalendars.length ; q++ ){
Logger.log( myCalendars[q].getName() +" > "+ myCalendars[q].getId());
}
I found the solution. Looks like hidden calendar will not show up in the All Calendar list and are not accessible by Name. Here is a good solution: Access hidden Google calendars from CalendarApp?