Unfortunately this is a bug in pCloud's OAuth2 implementation, namely the oauth2_token callback
. While we pass back the client_id and client_secret they provided us in their web interface their OAuth2 server does not recognize the client_secret and throws the error you are experiencing.
It looks like their OAuth2 server only works correctly when requesting permissions for the same pCloud account you used to create the OAuth2 application
. That's why I didn't catch that in development. It was as unexpected as a car exploding when anyone but the registered owner sits in the driver's seat and turns the key in the ignition. It's something that shouldn't happen and you don't check as a consumer.
Unfortunately, this means that we do not have any way to get an authentication token to pCloud which makes it impossible to use their API. Therefore I will have to remove the pCloud integration and move it to our "we'll never implement" list. Sorry. I was just as excited about this feature as you were – I have a lifetime subscription to them. But if they can't be bothered to implement their OAuth2 server correctly it doesn't quite fill me with confidence so I might have to shop around for a different cloud provider, again. Sigh. I almost miss the days I was using rewritable CD-ROMs...