Article directory
How to resolve the "Error: failed to configure OneDrive: empty token found" error when using Rclone to build a custom Microsoft OneDrive API?
To configure the self-built API of Microsoft Onedrive in Rclone, you need to configure config_token ▼
Option config_token. For this to work, you will need rclone available on a machine that has a web browser available. For more help and alternate methods see: https://rclone.org/remote_setup/ Execute the following on the machine with the web browser (same rclone version recommended): rclone authorize "onedrive" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" Then paste the result. Enter a value. config_token>
After the Rclone of the local computer obtains the token, and then returns to SSH to enter the token, the following error appears ▼

Couldn't decode response – try again (make sure you are using a matching version of rclone on both sides: invalid character 'e' looking for beginning of value
Error: failed to configure OneDrive: empty token found – please run “rclone config reconnect 22:”
Usage:
rclone config [flags] rclone config [command]Available Commands:
create Create a new remote with name, type and options.
delete Delete an existing remote.
disconnect Disconnects user from remote
dump Dump the config file as JSON.
file Show path of configuration file in use.
password Update password in an existing remote.
paths Show paths used for configuration, cache, temp etc.
providers List in JSON format all the providers and options.
reconnect Re-authenticates user with remote.
show Print (decrypted) config file, or the config for a single remote.
touch Ensure configuration file exists.
update Update options in an existing remote.
userinfo Prints info about logged in user of remote.flags:
-h, --help help for configAdditional help topics:
rclone config edit Enter an interactive configuration session.Use “rclone [command] –help” for more information about a command.
Use “rclone help flags” for to see the global flags.
Use “rclone help backends” for a list of supported services.2022/05/02 23:50:56 Fatal error: failed to configure OneDrive: empty token found – please run “rclone config reconnect 22:”
Why does Rclone have "Couldn't decode response - try again" error?
This is because all Rclone versions do not accept tokens larger than 4096.
The problem is that the Rclone that generates the token used to be non-encoded and was always less than 4096.
After Rclone version 1.56, the authorization code starts to be encoded, so the returned encoded token exceeds 4096 characters, so it cannot be pasted into the full token field in SSH.
However, this problem has arisen because the token obtained from Rclone is currently 4022 characters long.
How to solve Rclone display "Couldn't decode response - try again" error?
After the local computer is configured, the local computer'srclone.confThe contents of the configuration file are copied toLinuxon the serverrclone.confconfiguration file.
On both your local computer and the server, enter the following command to view the location of the R clone configuration file: ▼
rclone config file
Query the Rclone configuration file, and the obtained results are as follows▼
rclone config file Configuration file is stored at: /root/.config/rclone/rclone.conf
- Just put the local computer's configuration file
rclone.confcopy the contents to the Linux serverrclone.confThe configuration file can solve the problem that "Error: failed to configure OneDrive: empty token found" is displayed when Rclone configures Onedrive.
Hopefully, the article "Solving Rclone Error: failed to configure OneDrive: empty token found" shared on Chen Weiliang's blog ( https://www.chenweiliang.com/ ) will be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-27743.html
