Invalid 'access_token' with pCloud

What is the problem you are having with rclone?

I'm trying to use rclone with pCloud storage service. I have folowed these steps :

The configuration file looks good at the end of the process but I get error message when I launch commands. I get this:

2020/10/10 17:23:22 ERROR : : error listing: couldn't list files: pcloud error: Invalid 'access_token' provided. (2094) 2020/10/10 17:23:22 Failed to ls with 2 errors: last error was: couldn't list files: pcloud error: Invalid 'access_token' provided. (2094)

What is your rclone version (output from rclone version)

Latest release

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Desktop machine : Windows 10 64 vits
Headless server : Linux

Which cloud storage system are you using? (eg Google Drive)

pCloud

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone ls remote:/

The rclone config contents with secrets removed.

[remote]
type = pcloud
token = {"access_token":"MY_ACCESS_TOKEN","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}

A log from the command with the -vv flag


2020/10/10 17:39:14 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "ls" "remote:/" "-vv"]
2020/10/10 17:39:14 DEBUG : Using config file from ".config/rclone/rclone.conf"
2020/10/10 17:39:14 DEBUG : Creating backend with remote "remote:/"
2020/10/10 17:39:14 DEBUG : fs cache: renaming cache item "remote:/" to be canonical "remote:"
2020/10/10 17:39:14 ERROR : : error listing: couldn't list files: pcloud error: Invalid 'access_token' provided. (2094)
2020/10/10 17:39:14 DEBUG : 3 go routines active
2020/10/10 17:39:14 Failed to ls with 2 errors: last error was: couldn't list files: pcloud error: Invalid 'access_token' provided. (2094)
1 Like

Just for info, I did the same config with DROPBOX and GOOGLE DRIVE and works fine, I can list folders etc...

But failed with PCLOUD.

What happens when you authorize the remote?

rclone authorize pcloud

and get a new token?

here is what happens.
from my personal laptop (with web browser) I do the rclone authorize pcloud command, and then I get :

  1. I'm redirected to pcloud web to authenticate : step 1 in picture below
  2. after login I get this : step 2 in picture below
  3. then when I come back on my command I get the code : step 3 in picture below

  1. after that, I add just this code to rclone conf file.

I have same problem. I get same error when I do in linux

$ ./rclone ls pcloud:/
2020/10/11 17:24:13 ERROR : : error listing: couldn't list files: pcloud error: Invalid 'access_token' provided. (2094)
2020/10/11 17:24:13 Failed to ls with 2 errors: last error was: couldn't list files: pcloud error: Invalid 'access_token' provided. (2094)

But when I use Windows machine where I created the token, it works - I can list files in pcloud. The token is exactly same in both machines, Windows works and linux not.

Btw, I did not do this part in installation because I don't have root access:

sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone

I think it is not important.

Version rclone-v1.53.1-linux-amd64 and rclone-v1.53.1-windows-amd64.

I have no issues on a Linux machine as I just tested:

felix@gemini:~$ rclone ls PC:
 22250443 Getting started with pCloud.pdf
  6319438 My Videos/pCloud.mp4
  1442376 My Music/Demo Audio 2.mp3
  6698872 My Music/GotJoy.mp3
 28096964 My Music/Lovely Day.wav
 11252576 My Music/Momentum.mp3
   666846 My Pictures/friends.jpg
   189628 My Pictures/happy-family.jpg
    32905 My Pictures/in-the-sky.jpg
   500130 My Pictures/lovers.jpg
   238222 My Pictures/romance.jpg
   162388 My Pictures/sweet.jpg
felix@gemini:~$ rclone version
rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15

Update: It started to work now. I had to choose advanced config in rclone config and then choose 2 / EU region. All other settings default, except token of course.

Now my ~/.config/rclone/rclone.conf looks like this:

[pcloud]
type = pcloud
token = {"access_token":"xxx","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}
hostname = eapi.pcloud.com
1 Like

Are you in the EU region?

for me yes I'm in France

OK I test it right now and I come back here to post result

Yes, you need to use the EU when you authorize:

And for the config too in the advanced options.

yes works fine now.
so for info, from EU, here is a correct conf file :

[remote]
type = pcloud
hostname = eapi.pcloud.com
token = {"access_token":"TOKEN","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"} 

Thanks for helping :slightly_smiling_face:

I keep forgetting that they added another region. Perhaps a documentation update might help as well.

It is supposed to detect the region automatically.

Ah, but this detection won't work with rclone authorise...

If you had made the config file locally then copied it, that would have worked I think.

Yes, documentation and also this region question should be moved from advanced configuration to the standard one.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.