Google apps script 应用程序脚本中的日历:每次授权都需要。仅适用于主日历
在电子表格中,我有一个用于在谷歌日历中计算小时数的应用程序脚本,并且输出被复制到电子表格中 几天前,一切正常 但是今天(2013年7月1日星期一),当我尝试运行脚本时,每次都会收到消息“Authorized required” 我按下“授权”按钮,然后重新运行,再次得到消息“需要授权” 到Google apps script 应用程序脚本中的日历:每次授权都需要。仅适用于主日历,google-apps-script,google-calendar-api,google-oauth,Google Apps Script,Google Calendar Api,Google Oauth,在电子表格中,我有一个用于在谷歌日历中计算小时数的应用程序脚本,并且输出被复制到电子表格中 几天前,一切正常 但是今天(2013年7月1日星期一),当我尝试运行脚本时,每次都会收到消息“Authorized required” 我按下“授权”按钮,然后重新运行,再次得到消息“需要授权” 到 这项工作,但仅对主日历有效。最后,我使用将对日历API的访问更改为CalendarApp服务。getEvents var cal = CalendarApp.getCalendarById(cal_id)
这项工作,但仅对主日历有效。最后,我使用
将对日历API的访问更改为CalendarApp服务。getEvents
var cal = CalendarApp.getCalendarById(cal_id);
var this_year = new Date(2013,0,1);
var now = new Date()
var events = cal.getEvents(this_year, now, {search: event_name});
var url = "https://www.googleapis.com/calendar/v3/calendars/"+
calId+"/events?q=" + query + "&key=" + key;
var url = "https://www.googleapis.com/calendar/v3/calendars/"+
"primary"+"/events?q=" + query + "&key=" + key;
var cal = CalendarApp.getCalendarById(cal_id);
var this_year = new Date(2013,0,1);
var now = new Date()
var events = cal.getEvents(this_year, now, {search: event_name});