我已經部署了一個應用程式腳本作為 WebApp,它呼叫 Google Drive API。該應用程式可以僅使用范圍提供一些基本功能https://www.googleapis.com/auth/drive.metadata.readonly。但是,一些用戶希望具有需要https://www.googleapis.com/auth/drive.readonly范圍的附加功能。當用戶明確請求時,有沒有辦法動態更新此應用程式的授權范圍?
清單檔案(appsscript.json):
{
"timeZone": "Europe/Berlin",
"dependencies": {
"enabledAdvancedServices": []
},
"oauthScopes": [
"https://www.googleapis.com/auth/drive.metadata.readonly"
],
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8",
"webapp": {
"executeAs": "USER_ACCESSING",
"access": "DOMAIN"
}
}
uj5u.com熱心網友回復:
可悲的是,沒有辦法使用 Apps 腳本來做到這一點。
但是,根據用戶的偏好,您可以重定向用戶以執行另一個腳本/Web 應用程式,該應用程式執行需要更寬松范圍的任務。
您還可以在此處請求 Google 問題跟蹤器的功能。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/449467.html
