Android Google Drive API 异常 : 403 Forbidden

标签 android api credentials drive

我正在开发一个可以访问 Google Drive 上用户的 appdata 文件夹的应用程序。当我处于 Debug模式时,该应用程序运行良好。当我发布应用程序并尝试连接到 Google Drive 时,在我选择要连接的帐户后,它给了我这个错误:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 
403 Forbidden 
{
   "errors" : [ {
      "domain" : "global",
      "reason" : "insufficientScopes",
      "message" : "The granted scopes do not give access to all of the requested spaces.",
      "locationType" : "parameter",
      "location" : "spaces"
   } ],
      "code" : 403,
      "message" : "The granted scopes do not give access to all of the requested spaces."
}

我使用这种方式连接到 Google Drive:https://developers.google.com/drive/v3/web/quickstart/android

我还在 Google Dev Console 中为调试和 Release模式制作了一份凭据。

我怎么解决这个问题?
任何帮助都是不胜感激的。谢谢小伙伴们!

最佳答案

关于Android Google Drive API 异常 : 403 Forbidden,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35754690/

相关文章:

java - 没有这样的方法错误: No virtual method getMapAsync

java - 使用函数隐藏所有相对布局,我们选择的除外

java - 了解 Twitter API

mysql - 规范化该数据库的最佳方法是什么?

c# - WCF服务Process.Start在网络服务帐户下模拟为其他用户

android - singleTask 的多个 Activity

android - 如何使用 Malloc Debug 检查 native 内存泄漏?

javascript - 谁在使用 Justin TV API?

grails - 如何使用 Grails-cxf 插件向 Web 服务提供动态凭据(用户名和密码)

.net - 如何为单击一次应用程序指定用户凭据?