Google 课堂测试帐户无法访问云端硬盘

Google Classroom test account cannot access Drive

我目前正在从事一个涉及课堂和 Google 云端硬盘 API 的项目。但是,Google 提供的 Google 课堂测试帐户无法访问 Google 云端硬盘。有没有办法获得使用测试帐户访问这两个 API 的权限?

您可能想尝试使用 Google Application Default Credentials,它提供了一种获取授权凭据以用于调用 Google API 的简单方法。这些还提供了一种在部署之前测试应用程序时使用替代凭据的方法。

除此之外,Authenticating applications with a client library 中还提到,应用程序默认凭据允许应用程序从多个来源获取凭据,因此您可以在本地测试您的应用程序,然后将其部署到 Compute Engine 实例而无需更改申请代码。

您可能需要查看给定的链接以获取更多信息。

根据 documentation on test accounts, they do not have access to applications other than Classroom, which does include Drive and therefore the Drive API. However, Google just announced,您不能通过个人帐户 (@gmail.com) 使用课堂,这将提供一个替代方案。