authentication - 如何在打开的 google-spreadsheet 上请求 popup-auth-window 以获取用户电子邮件?
问题描述
我试图获取电子邮件(Session.getActiveUser().getEmail()),但我应该询问用户许可:
// it script on google script
function onOpen() {
Logger.log(Session.getActiveUser().getEmail())
Logger.log(Session.getEffectiveUser().getEmail())
}
// it's manifest for access
{
"timeZone": "Europe/Moscow",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets.currentonly",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/script.scriptapp"
]
}
我应该如何请求 auth-window?
解决方案
推荐阅读
- tensorflow-serving - TensorFlow 服务与 XLA
- c# - 启动项目与 VSTO 的相关性
- python - 如何计算以数字命名的列标签的数量?
- python - 根据数据框中的两列删除异常值
- arrays - 使用 Typescript 将地图函数中的道具发送到 React 中的另一个组件
- php - 如何从 PHP 中的可点击图像进行 SQL 查询
- postgresql - 如何取消设置(删除,而不是重置)自定义配置参数?
- python - 谷歌语音识别 API:返回空结果
- javascript - 带有故事书的移动仿真反应
- javascript - 使用js中的.parentElement方法返回未定义