Failed to configure Token (OneDrive)


#1

Hello Mods,

I’m facing issue with Connecting my OneDrive Account. As i’m on Windows System, i’m using a Headless System to connect OneDrive. The problem persists is i get token error.

While on pc there is no error, i get the code and paste in headless system it shows several errors. (I had changed some of token with * just to paste here)

     rclone config
2019/01/23 16:42:01 NOTICE: Config file "*************" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> onedrive
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / A stackable unification remote, which can appear to merge the contents of several remotes
   \ "union"
 2 / Alias for a existing remote
   \ "alias"
 3 / Amazon Drive
   \ "amazon cloud drive"
 4 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ "s3"
 5 / Backblaze B2
   \ "b2"
 6 / Box
   \ "box"
 7 / Cache a remote
   \ "cache"
 8 / Dropbox
   \ "dropbox"
 9 / Encrypt/Decrypt a remote
   \ "crypt"
10 / FTP Connection
   \ "ftp"
11 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
12 / Google Drive
   \ "drive"
13 / Hubic
   \ "hubic"
14 / JottaCloud
   \ "jottacloud"
15 / Local Disk
   \ "local"
16 / Mega
   \ "mega"
17 / Microsoft Azure Blob Storage
   \ "azureblob"
18 / Microsoft OneDrive
   \ "onedrive"
19 / OpenDrive
   \ "opendrive"
20 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
21 / Pcloud
   \ "pcloud"
22 / QingCloud Object Storage
   \ "qingstor"
23 / SSH/SFTP Connection
   \ "sftp"
24 / Webdav
   \ "webdav"
25 / Yandex Disk
   \ "yandex"
26 / http Connection
   \ "http"
Storage> 18
** See help for onedrive backend at: https://rclone.org/onedrive/ **

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine:
        rclone authorize "onedrive"
Then paste the result below:
result> {"access_token":"EwBgA8l6BAAURSN/FHlDW5xN74t6GzbtsBBeBUYAAeqy9Ha3bYJgV7uhKWcSXBv
2019/01/23 16:46:26 Failed to configure token: unexpected end of JSON input
***************************************************************************
[box] 2SI7UyYRyDkqNEP4oIlq/OXmdIdxc1B9BxB/5LU/Xnco6NE4DAyNaLNg6oReNle2RpCS1c4+TskRkLez
LlXPLFXbF9JG1UaR7ukxwXs3zj7FAGwy09qchek2BHvdrkf18qe7Fmx5FzTlWHx7Jx0xs7Za/IMkoqhf
-bash: 2SI7UyYRyDkqNEP4oIlq/OXmdIdxc1B9BxB/5LU/Xnco6NE4DAyNaLNg6oReNle2RpCS1c4+TskRkLez: No such file or directory
[box] rVsHoS8liDf3bRDrMkJbOPkb82dkVwF4hLuIzM7320+FEtU6unra3OtL0N8/wIrwgd/dGRKqIF1Dszv+
-bash: rVsHoS8liDf3bRDrMkJbOPkb82dkVwF4hLuIzM7320+FEtU6unra3OtL0N8/wIrwgd/dGRKqIF1Dszv+: No such file or directory
[box] PhjOE7yjQIbLQy2gRzKhGDvHwDTVxyD/kFaK/tlspzOiuiEzC6N8pk58ppa16H3aXU8TLsorWBWYrQEz
-bash: PhjOE7yjQIbLQy2gRzKhGDvHwDTVxyD/kFaK/tlspzOiuiEzC6N8pk58ppa16H3aXU8TLsorWBWYrQEz: No such file or directory
[box] +WGP4H4PvujQ6M20x3VZ6CderCdFyPS1f/xmyLRW67GFluZWSW9/+epLbx1QU6UwTNu2nC9f8PTNg15s
-bash: +WGP4H4PvujQ6M20x3VZ6CderCdFyPS1f/xmyLRW67GFluZWSW9/+epLbx1QU6UwTNu2nC9f8PTNg15s: No such file or directory
[box] DZgAACO24aHRvDsp+MAJQD9Dwq+NTei+918+Ubp/J8uJe9qz5BAKXmzLskNIxsOC2nNMZ3T/MVPohqLm
-bash: DZgAACO24aHRvDsp+MAJQD9Dwq+NTei+918+Ubp/J8uJe9qz5BAKXmzLskNIxsOC2nNMZ3T/MVPohqLm: No such file or directory
[box] +hamYS0c3H0kwWDfNxrUvJKL72Fvb//Y1mnVG52kgfopA8OrtII9Kr3+vmRAcPsqNrghmp7wXA3Le6xA
-bash: +hamYS0c3H0kwWDfNxrUvJKL72Fvb//Y1mnVG52kgfopA8OrtII9Kr3+vmRAcPsqNrghmp7wXA3Le6xA: No such file or directory
[box] 0ghEwfPDw8eJL23chX18xjCMTnCjT8f+bPJT8lhLjs9SvpCsMF3SqI68mubacOpjXP3eYNb+C59+SnQf
-bash: 0ghEwfPDw8eJL23chX18xjCMTnCjT8f+bPJT8lhLjs9SvpCsMF3SqI68mubacOpjXP3eYNb+C59+SnQf: command not found
[box] +y4hruZwoIVYSdhIp12xTtMnMpalWuy2137rI6+SNEO/O7YVzNmrvt99/FXkuQL6+sExQIJ7qr8xIH80
-bash: +y4hruZwoIVYSdhIp12xTtMnMpalWuy2137rI6+SNEO/O7YVzNmrvt99/FXkuQL6+sExQIJ7qr8xIH80: No such file or directory
[box] TUV6IV0/zOdPezoBG7aL/I5guuhyuBYdjb1rQa/tTArsOMUpehpRZE9vyd/l/OQenCY2T3hd9LnGOJul
YIIc1*biKnG4yg5ZJhXLG0BELYghwGWmxxghxGWsRIepMZOZSEP*3cvpJ9T070V003jWDsyINa2WAT6k
lrqiurXejgqghxSId0nTtvYefxUF7cKo7KA74wQmm61M1t6PvtG9htgyQ2Pk2xW!715xhNSigDBL5Aj*
YXou7e5ZBc0F4gl!fNf36O8uAlBf2TzBKulV3IXThClnYZG8njeG6EoZ3qgBWBL3Z8Srq41lv4pU0S7b
loWY43LUfiv5p1!J7OAoYppAE2IXz10U29u6wI4H3KVOXwbifAqXTmCU3G3VE8W3oDRFV9eqYgtr3ZjX
LKd4PXouyg2FGvHQvigkVzb*EMIBIHKse9LBbrm4XA*6sgltsdGNGSqzSpuaA$$","expiry":"2019-
01-23T23:15:34.4606385+05:30"}-bash: TUV6IV0/zOdPezoBG7aL/I5guuhyuBYdjb1rQa/tTArsOMUpehpRZE9vyd/l/OQenCY2T3hd9LnGOJul: No such file or directory
[box] wrmgw37VbHLxFSeLPBQxbosdLMGvLl1g1XJVv0fGBhP13istwnrNaDZjulo37/FeUoA2e6MzC7VT6IrY
-bash: wrmgw37VbHLxFSeLPBQxbosdLMGvLl1g1XJVv0fGBhP13istwnrNaDZjulo37/FeUoA2e6MzC7VT6IrY: No such file or directory
[box] 9d3lsORv2kOKbwbE6Djd0guDtjavuiPGI1GkXXgf/SzqseqV7wTjUmtE3C+Gtw+UEwvI+PCY8U3v3hP3
-bash: 9d3lsORv2kOKbwbE6Djd0guDtjavuiPGI1GkXXgf/SzqseqV7wTjUmtE3C+Gtw+UEwvI+PCY8U3v3hP3: No such file or directory
[box] LlXPLFXbF9JG1UaR7ukxwXs3zj7FAGwy09qchek2BHvdrkf18qe7Fmx5FzTlWHx7Jx0xs7Za/IMkoqhf
-bash: LlXPLFXbF9JG1UaR7ukxwXs3zj7FAGwy09qchek2BHvdrkf18qe7Fmx5FzTlWHx7Jx0xs7Za/IMkoqhf: No such file or directory
[box] o+5vAQ3nQsrZ4B+jKXzxT6CX7bAl5lGGjPFh/GYXuBjK9VolQu+cmDfdFa2AWR4gticyXaq4MLPBUlri
-bash: o+5vAQ3nQsrZ4B+jKXzxT6CX7bAl5lGGjPFh/GYXuBjK9VolQu+cmDfdFa2AWR4gticyXaq4MLPBUlri: No such file or directory
[box] DmBEeHph7PK0kngQ85GiaF47PqQh7AHGE6JjYdYcR/QwBnX0C","token_type":"Bearer","refres
-bash: DmBEeHph7PK0kngQ85GiaF47PqQh7AHGE6JjYdYcR/QwBnX0C,token_type:Bearer,refres: No such file or directory
[box] h_token":"MCYEFQOiYWHHfJ4K0SUtL1cGZTKi17NyMLd*QGrnuwUKn6Vhu3braDdRv9LiI6*dMl8iCL
-bash: h_token:MCYEFQOiYWHHfJ4K0SUtL1cGZTKi17NyMLd*QGrnuwUKn6Vhu3braDdRv9LiI6*dMl8iCL: command not found
[box] YIIc1*biKnG4yg5ZJhXLG0BELYghwGWmxxghxGWsRIepMZOZSEP*3cvpJ9T070V003jWDsyINa2WAT6k
-bash: YIIc1*biKnG4yg5ZJhXLG0BELYghwGWmxxghxGWsRIepMZOZSEP*3cvpJ9T070V003jWDsyINa2WAT6k: command not found
[box] lrqiurXejgqghxSId0nTtvYefxUF7cKo7KA74wQmm61M1t6PvtG9htgyQ2Pk2xW!715xhNSigDBL5Aj*
-bash: !715: event not found
[box] YXou7e5ZBc0F4gl!fNf36O8uAlBf2TzBKulV3IXThClnYZG8njeG6EoZ3qgBWBL3Z8Srq41lv4pU0S7b
-bash: !fNf36O8uAlBf2TzBKulV3IXThClnYZG8njeG6EoZ3qgBWBL3Z8Srq41lv4pU0S7b: event not found
[box] loWY43LUfiv5p1!J7OAoYppAE2IXz10U29u6wI4H3KVOXwbifAqXTmCU3G3VE8W3oDRFV9eqYgtr3ZjX
-bash: !J7OAoYppAE2IXz10U29u6wI4H3KVOXwbifAqXTmCU3G3VE8W3oDRFV9eqYgtr3ZjX: event not found
[box] LKd4PXouyg2FGvHQvigkVzb*EMIBIHKse9LBbrm4XA*6sgltsdGNGSqzSpuaA$$","expiry":"2019-
-bash: LKd4PXouyg2FGvHQvigkVzb*EMIBIHKse9LBbrm4XA*6sgltsdGNGSqzSpuaA47359,expiry:2019-: command not found
[box] A01-23T23:15:34.4606385+05:30"}

#2

It looks like something went wrong with the pasting… Are you pasting from Windows CMD or Powershell? I wonder if it is something to do with that.

You could always try the copying the config file method.


#4

Yes, i’m pasting from cmd to KiTTY

i had tried using pastebin too but nothing works still same error.

And about the method i’m doing something wrong using config method…

  1. On my desktop i found the location of config…

rclone config -h

and then

rclone config file

it gave me address

c:\users\my name\.config\rclone\rclone.conf

Now i went to my headless system KiTTY

and did same

rclone config file

Configuration file doesn't exist, but rclone will use this path:
/*****/drive1/name/.config/rclone/rclone.conf

then according as method,

--config="c:\users\my name\.config\rclone\rclone.conf": Config file

it says,

-bash: --config="c:\users\my name\.config\rclone\rclone.conf": : command not found


#5

Copy the file “c:\users\my name.config\rclone\rclone.conf” from your WIndows box to the remote box and place it at “/*****/drive1/name/.config/rclone/rclone.conf” - that shoud fix it.


#6

Thank you for the help… you can close the topic