我正在尝试使用Java应用程序对Google云端存储进行身份验证。我已经可以使用Google使用OAuth 2获取令牌。我试图研究,但似乎找不到任何答案。
解决
答案 0 :(得分:0)
基本上我所要做的就是在Java类中添加范围而不是在JSON文件中。看着错误的地方。使用下面的代码段附加
/** OAuth 2.0 scopes. */
private static final List<String> SCOPES = Arrays.asList(
"https://www.googleapis.com/auth/userinfo.profile",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/cloud-platform");