google 驱动器文件访问需要什么 client_secret.json 文件

what client_secret.json file is it required for google drive files access

我收到这个错误:

  File "/usr/local/lib/python3.7/site-packages/pydrive/auth.py", line 388, in LoadClientConfigFile
    raise InvalidConfigError('Invalid client secrets file %s' % error)
pydrive.settings.InvalidConfigError: Invalid client secrets file ('Error opening file', 'client_secrets.json', 'No such file or directory', 2)

我只想使用 pydrive 列出文件和文件夹!

我尝试创建凭据,但在同意页面上显示未验证状态。

我从 OAuth 2.0 Client IDs 选项卡下的凭据页面下载了创建的凭据并下载了凭据文件 secret_json_[.....].json 文件

正在研究 the documentation pyDrive

Click ‘Download JSON’ on the right side of Client ID to download client_secret_<really long ID>.json.

The downloaded file has all authentication information of your application. Rename the file to client_secrets.json and place it in your working directory.

所以您可能缺少重命名文件并将其放入工作目录的最后一步。


I tried creating credentials but On consent page its showing unverified status.

这应该无关紧要,未验证只是意味着您正在尝试访问敏感范围,并且在 Google 验证您的应用程序之前会有一个额外的屏幕表明它是 unverified apps。可以 personal/development 使用。