DriveApp.getFoldersByName on android tablet/phone permissions problem

时间:2019-05-31 11:44:34

标签: google-apps-script google-sheets

The problem is that my script runs well on windows PC, but when I run the same script on Android phone/tablet, i get:

You do not have permission to call DriveApp.getFoldersByName. Required permissions: (https://www.googleapis.com/auth/drive.readonly || https://www.googleapis.com/auth/drive) at ....

These scopes are included in appscript.json

"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets.currentonly", 
              "https://www.googleapis.com/auth/spreadsheets", 
              "https://www.googleapis.com/auth/drive.readonly",
              "https://www.googleapis.com/auth/drive"]

Any help will be appreciated. Thanks in advance :)

I didn't find such kind of restrictions, using mobile OS.

This is the row which throws the error:

var folder = DriveApp.getFoldersByName(searchedFolder).next().getId();

0 个答案:

没有答案