【发布时间】:2012-10-02 20:32:57
【问题描述】:
我正在测试 Google Drive API。测试脚本执行 HTTP GET 来访问 Files->List API,但不知何故,我总是在项目中得到一个空列表。我的谷歌驱动器中有数百个文件,所以结果出乎意料。 HTTP 响应如下所示。
{
"kind": "drive#fileList",
"etag": "\"VEU5fga3uYlZRf0pG-N1kS4iWP4/Kxo5eGvPKynWfroe9v5L5T43-n0\"",
"selfLink": "https://www.googleapis.com/drive/v2/files?maxResults=5",
"items": []
}
【问题讨论】:
-
我的范围是googleapis.com/auth/drive。我也尝试过使用 docs.google.com/feeds 范围和 HTTP GET docs.google.com/feeds/default/private/full,但这也不起作用。
-
看起来通过服务帐户访问 google drive api 与通过服务帐户绑定的用户访问 google drive 不同。服务帐户拥有自己的小世界,与用户的 Google Drive 空间分开。
标签: google-drive-api