问题描述
我正在尝试将谷歌驱动器照片下载到我的本地驱动器。我认为这应该是一项简单的任务,但实际上具有挑战性,尤其是我第一次尝试使用 Google Api。
按照此有用的 Youtube video 和此 PyDrive Link
中的所有步骤进行操作我到达了 Rename the file to “client_secrets.json” and place it in your working directory.
然后我运行这段代码
from pydrive.auth import GoogleAuth
gauth = GoogleAuth()
gauth.LocalWebserverAuth() # Creates local webserver and auto handles authentication.
但没有到达任何地方。特别是,我收到了这个错误
错误 403:access_denied 开发者未授予您访问此权限 应用程序。目前正在测试中,尚未得到验证 谷歌。如果您认为自己应该拥有访问权限,请联系开发者
我是开发人员,我正在尝试将我的 google 文件(实际上是一张图片)下载到我的本地驱动器。
感谢大家的支持。
解决方法
转到 API 和服务部分,并在 OAuth 同意屏幕选项卡中将自己添加为“测试用户”。