授权错误错误400:Invalid_request配置Rclone gdrive

发布于 2025-01-25 12:57:27 字数 512 浏览 2 评论 0 原文

我无法为RCLONE配置GDRIVE,给出400个错误。

​/I.SSTATIC.NET/L5I9X.PNG“ ALT =”在此处输入图像描述”>

I'm unable to configure gdrive for rclone, giving 400 error.

enter image description here

enter image description here

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

宫墨修音 2025-02-01 12:57:27

根据此帖子此错误消息可能是通过使用旧版本的Rclone引起的。如果您尚未完成此操作,请尝试安装最新版本。

另外,您不应该发布客户ID和秘密。您应该撤销它们并重新创建它们。

我正在使用Rclone 1.60,但我仍然有相同的错误,但我将其修复了。您需要将Rclone的重定向URL添加到您为Rclone创建的OAuth 2.0客户端ID的授权重定向URIS部分(在Google API控制台中)。

首先创建自己的客户端ID,如 rclone网站。确保它具有秘密 - 如果没有,请单击“重置秘密”。创建秘密后,请记住要保存。

然后,您需要获取重定向的URL:

  1. start rclone config 并通过向导进行,在要求它时将其赋予客户端ID和秘密。
  2. 继续使用 rclone config ,直到它到达向导的自动配置部分(使用auto config?)。回答这个问题的“ n”。
  3. 在其输出rclone中,您可以命令执行看起来像这样的命令:克隆授权“驱动器”“ xxxx” 。在另一个终端会话中执行该命令。
  4. rclone授权命令将导致打开Goog​​le帐户页面,其中获取错误消息错误400:redirect_uri_mismatch
  5. rclone输出是此文本:确保确保您的重定向URL设置为“ http://127.0.0.1:53682/”

现在,您需要将重定向URL添加到客户端ID的授权重定向URI中。

  1. 转到 google api console
  2. 屏幕左侧部分中的'凭据'。
  3. 单击“ OAuth 2.0客户端ID”部分中的客户端ID。
  4. 将重定向URL放在“授权重定向URI”部分中,然后单击“保存”。

完成授权过程:

  1. 返回到 rclone授权 session-在其输出中,将有一条线以“如果您的浏览器不自动打开...”。按照该行中的链接。打开的网页将说“成功!”。
  2. RCLONE授权会话将产生令牌。复制令牌并将其粘贴到 rclone config session(正在等待令牌)中。
  3. 完成巫师。遥控器应设置并立即工作。

According to this post this error message may be caused by using an old version of rclone. Try installing the latest version if you haven't already done that.

Also you shouldn't post your client ID and secret. You should revoke them and re-create them.

I am using rclone 1.60, I still got the same error but I fixed it. You need to add rclone's Redirect URL to the Authorized redirect URIs section of the OAuth 2.0 Client ID that you created for rclone (in the Google API console).

First create your own client ID as described on the rclone website. Make sure it has a secret - click 'Reset Secret' if it doesn't. Remember to save after creating the secret.

Then you need to get the redirect URL:

  1. Start rclone config and proceed through the wizard, giving it the client ID and the secret when it asks for it.
  2. Continue with rclone config until it gets to the auto config part of the wizard (Use auto config?). Answer 'n' to this question.
  3. In its output rclone gives you a command to execute that looks like this: clone authorize "drive" "XXXX". Execute that command in another terminal session.
  4. The rclone authorize command will cause the Google Accounts page to be opened, which gets the error message Error 400: redirect_uri_mismatch
  5. In the rclone output is this text: Make sure your Redirect URL is set to "http://127.0.0.1:53682/"

Now you need to add the redirect URL to the Client ID's Authorized redirect URIs.

  1. Go to the Google API console
  2. Click on 'Credentials' in the left part of the screen.
  3. Click on Client ID in the section 'OAuth 2.0 Client IDs'.
  4. Put the Redirect URL in the section 'Authorized redirect URIs' and click 'Save'.

Complete the authorization process:

  1. Go back to the rclone authorize session - in its output there will be a line that starts with 'If your browser doesn't open automatically...'. Follow the link in that line. The web page that opens will say 'Success!'.
  2. The rclone authorize session will have produced a token. Copy that token and paste it into the rclone config session (which is waiting for a token).
  3. Complete the wizard. The remote should be setup and working now.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文