【问题标题】:Change scopes about CalendarApp.getallcalendards() method更改有关 CalendarApp.getallcalendards() 方法的范围
【发布时间】:2020-05-09 12:31:00
【问题描述】:

在我的代码库中,我使用 CalendarApp.getallcalendar() 来获取所有用户的日历。

此方法已获得此授权:

https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/calendar.readonly
https://www.google.com/calendar/feeds

在我的脚本中,关于日历的范围是https://www.googleapis.com/auth/calendar 因此,当用户访问我的脚本应用程序时,权限是:“...编辑和删除日历...”,但我只需要阅读它。应该可以改吗? 我想要这个范围:https://www.googleapis.com/auth/calendar.readonly

【问题讨论】:

    标签: google-apps-script publishing


    【解决方案1】:

    只需从范围数组中删除https://www.googleapis.com/auth/calendar,因为它为您提供读/写访问权限。在清单中更改它,然后尝试再次运行应用程序,系统会要求您再次授权(使用新范围)。

    【讨论】:

      猜你喜欢
      • 2014-08-19
      • 1970-01-01
      • 1970-01-01
      • 2011-10-22
      • 2012-12-19
      • 1970-01-01
      • 1970-01-01
      • 2018-01-20
      • 2014-08-17
      相关资源
      最近更新 更多