我正在尝试使用文档中的 Google Drive File API 列出我的所有 google 脚本文件here。然而我总是得到一个空的 [] 列表。我认为我的令牌和范围都很好,因为我从 Google OAuth2 取回了这个:
{ "access_token": "xxxxx", "expires_in": 3600, "refresh_token": "yyyyy",
"scope": "https://www.googleapis.com/auth/drive.scripts https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive",
"token_type": "Bearer"
}
但是当我使用 mimeType 过滤发出查询时(我只想获取谷歌应用程序脚本列表):
mimeType = 'application/vnd.google-apps.script'
即使我刚刚在 Google 表格中创建了一个 google 脚本,我也只会返回一个空的项目列表 ([]):
{ "kind": "drive#fileList", "etag": "....", "selfLink": "https://www.googleapis.com/drive/v2/files?q=mimeType+%3D+'application/vnd.google-apps.script'", "incompleteSearch": false, "items": []}
我猜测 app-script 的含义不同于 google 脚本代码,它是 Google Sheet 的一部分...任何帮助表示赞赏:)