我正在尝试将 google drive photo 下载到我的本地驱动器。我认为这应该是一项简单的任务,但它实际上具有挑战性,尤其是这是我第一次尝试使用 google API。
按照这个有用的 Youtube video 中的所有步骤操作在这个 PyDrive Link 下
我到达了显示将文件重命名为“client_secrets.json”并将其放在您的工作目录中的步骤。
然后我运行这段代码
from pydrive.auth import GoogleAuth
gauth = GoogleAuth()
gauth.LocalWebserverAuth() # Creates local webserver and auto handles authentication.
但没有到达任何地方。特别是,我得到了这个错误
Error 403: access_denied The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer
我是开发者,我正在尝试将我的谷歌文件(实际上是一张图片)下载到我的本地驱动器。
感谢大家的支持。
最佳答案
转到 API 和服务部分并在 OAuth 同意屏幕选项卡中将您自己添加为“测试用户”。
关于python-3.x - PyDrive 快速入门和错误 403 : access_denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65980758/