错误:使用google drive api的restricted_client

Jes*_* RJ 7 google-drive-api

我正在尝试使用python将文件上传到谷歌驱动器.我从这里显示的快速入门开始:https: //developers.google.com/drive/api/v3/quickstart/python 我创建了oAuth 2客户端ID并将凭据json文件下载到我的项目文件夹中.但是,当我尝试运行代码时,它打开浏览器以确认我收到以下错误:

Error: restricted_client

Unregistered scope(s) in the request: https://www.googleapis.com/auth/drive
Request Details

That’s all we know.
Run Code Online (Sandbox Code Playgroud)

我试过改变范围

SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly'
Run Code Online (Sandbox Code Playgroud)

SCOPES = 'https://www.googleapis.com/auth/drive'
Run Code Online (Sandbox Code Playgroud)

但是我得到了同样的错误,我也试过制作一个新的凭证和客户端ID,仍然得到相同的错误

任何人都可以指出我做错了什么?

小智 0

这个问题似乎已经到了谷歌的尽头。我在使用 java SDK 时遇到了类似的问题,并且许多其他人今天仅在使用 YouTube API 时报告了相同的问题。


归档时间:

查看次数:

572 次

最近记录:

7 年,5 月 前