Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 驱动器API未运行?_Java_Android_List_Google Drive Android Api - Fatal编程技术网

Java 驱动器API未运行?

Java 驱动器API未运行?,java,android,list,google-drive-android-api,Java,Android,List,Google Drive Android Api,我正在尝试使用驱动器API列出Google Drive中的所有文件。我找到了一个API,它给出了这个列表 当我尝试在API资源管理器中运行此API时,它工作正常。给我所有文件的清单 但当我在浏览器中复制粘贴url并运行它以验证API密钥时,会显示一个错误 {你的API密钥} { "error": { "errors": [ { "domain": "global", "reason": "insufficientFilePermissions", "message": "The user d

我正在尝试使用驱动器API列出Google Drive中的所有文件。我找到了一个API,它给出了这个列表

当我尝试在API资源管理器中运行此API时,它工作正常。给我所有文件的清单

但当我在浏览器中复制粘贴url并运行它以验证API密钥时,会显示一个错误

{你的API密钥}

{
 "error": {
"errors": [
{
"domain": "global",
"reason": "insufficientFilePermissions",
"message": "The user does not have sufficient permissions for this file."
}
],
"code": 403,
"message": "The user does not have sufficient permissions for this file."
}
}

我对安卓系统相当陌生。我只想检索文件列表。没有搜索功能。

问题可能是您的文件权限检查此文档中的文件权限-


Google Drive API仅支持OAuth 2.0


可能是这些文件没有权限,或者您的密钥错误。@RakeshChouhan如何解决此问题。我试了两天。我已经创建了新的密钥,但出现了相同的错误。您需要使用OAuth进程登录,该进程包括授权和作用域。API密钥是不够的。我已经用Javascript完成了这项工作,但既然您使用的是Android,请尝试使用该驱动器。