2012-10-28 248 views
3

我有一个使用新版Google Play服务的Android应用程序。我能够成功验证用户身份并取回令牌。现在我有一个令牌,我有一个使用此令牌执行某些操作的服务器上的脚本。当我尝试执行简单的REST API调用时,例如: GET https://www.googleapis.com/drive/v2/aboutGoogle Drive SDK和API

我收到错误“Access Not Configured”。我检查了我的API控制台并启用了Drive API和Drive SDK。

这不可能吗?还是我以错误的方式去做这件事?

谢谢

+0

“服务器上的脚本”是什么意思?它运行在完全不同的机器上?不是在请求令牌的android设备上? – stan0

回答

0

您可能会错过范围。这里是一个全套

"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/", 

也许与开始得到您的应用程序的工作,然后删除不实际使用的。

+0

使用Google Play服务进行身份验证时,我使用的范围是“oauth2:https://www.googleapis.com/auth/drive”。我相信这应该涵盖所有Drive API调用。 – Nick