Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/23.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
Android googledrivesdk和API_Android_Google Api_Google Drive Api_Google Play Services - Fatal编程技术网

Android googledrivesdk和API

Android googledrivesdk和API,android,google-api,google-drive-api,google-play-services,Android,Google Api,Google Drive Api,Google Play Services,我有一个Android应用程序,使用新的Google Play服务。我能够成功地对用户进行身份验证并取回令牌。现在我有了一个令牌,我在服务器上有了一个脚本,它使用这个令牌执行一些操作。当我尝试执行简单的REST API调用时,例如: 得到 我收到错误“未配置访问”。我检查了我的API控制台,并启用了驱动器API和驱动器SDK 这不可能吗?还是我走错了方向 谢谢您可能缺少一个范围。这是全套的 "https://www.googleapis.com/auth/drive.file", "https:

我有一个Android应用程序,使用新的Google Play服务。我能够成功地对用户进行身份验证并取回令牌。现在我有了一个令牌,我在服务器上有了一个脚本,它使用这个令牌执行一些操作。当我尝试执行简单的REST API调用时,例如: 得到

我收到错误“未配置访问”。我检查了我的API控制台,并启用了驱动器API和驱动器SDK

这不可能吗?还是我走错了方向


谢谢

您可能缺少一个范围。这是全套的

"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile",
"https://docs.googleusercontent.com/",
"https://docs.google.com/feeds/",
也许从这一点开始,让你的应用程序正常工作,然后删除那些你实际上没有使用的应用程序。

当使用Google Play Services进行身份验证时,我使用的范围是“oauth2:”。我相信这应该涵盖我所有的驱动API调用。“服务器上的脚本”是什么意思?它在完全不同的机器上运行?不在请求令牌的android设备上?