Google刷新令牌400
Please make sure of the following things
- [X] I have read the documentation.
- [X] I'm sure there are no duplicate issues or discussions.
- [X] I'm sure it's due to
alistand not something else(such asDependenciesorOperational). - [X] I'm sure I'm using the latest version
Alist Version / Alist 版本
v3.4.0
Driver used / 使用的存储驱动
Google drive
Describe the bug / 问题描述
使用文档中的https://tool.nn.ci/google/request 点击获取code会出现400: invalid_request,如图:
使用自己的client_id & client_secret并发布应用依旧是此错误,所以排除是公共id的问题,详细错误为:
错误 400:invalid_request The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method. 请求详情: redirect_uri=urn:ietf:wg:oauth:2.0:oob
但是如果不发布应用,refresh_token会出现隔几天失效的情况,届时访问会出现invalid_grant报错
但是rclone却可以在本地连接到已发布应用后生成refresh_token,希望可以修复
Reproduction / 复现链接
https://tool.nn.ci/google/request
Logs / 日志
No response
顺便一提,最新版中谷歌存储分片大小一直显示Unknown type
同样的问题 能解决吗
同样的问题 能解决吗
用rclone获取到刷新令牌后复制token到alist
Any way to go around this problem? found similar problem on rclone forum
Any way to go around this problem? found similar problem on rclone forum
I think the code wich used for authorization should be updated. Maybe Google has updated the api. Rclone 1.60 can get the refresh_token normally. You can try to use rclone authrize the application and paste the refresh_token from rclne config file to alist.
For future searcher, run rclone config (version >1.60) -> create new remote -> drive, when it ask client_id & client_secret, take from the site, then keep pressing Enter till you see option choose teamdrive/sharedrive (can't remember), choose or not depend on you. The end you'll see refresh_token, can confirm zsbai's recommendation works. Thanks zsbai.
For future searcher, run
rclone config(version >1.60) -> create new remote -> drive, when it ask client_id & client_secret, take from the site, then keep pressingEntertill you see option choose teamdrive/sharedrive (can't remember), choose or not depend on you. The end you'll see refresh_token, can confirm zsbai's recommendation works. Thanks zsbai.
you are welcome:)
This should have be fixed in https://github.com/alist-org/docs/commit/f217e5f5f75850a18eff5c4527ea495fe8d17979