google-apps-script - 更改有关 CalendarApp.getallcalendards() 方法的范围
问题描述
在我的代码库中,我使用 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
解决方案
只需从范围数组中删除https://www.googleapis.com/auth/calendar,因为它为您提供读/写访问权限。在清单中更改它,然后尝试再次运行应用程序,并且应该要求您再次授权(使用新范围)。
推荐阅读
- php - PHP; 时间转换形式距离和速度
- structure - 如何将结构从合同 A 传递给合同 B?最佳实践
- php - 无法在 PHP 中下载 pdf
- javascript - 三向按钮切换
- c# - 自定义 Nuget 包显示缺少依赖项错误
- ruby-on-rails - Rails:配置应用程序
- makefile - makefile 中 Match-Anything 模式规则的行为
- java - 如何使用 SimpleJpaRepository 中的方法检查数据库中是否存在实体
- docker - 基于控制台的 dockerized kafka 消费者
- python - 请求无效。详细信息:参数:无效的 JSON。JSON 内容中无法识别令牌