pCloud API autentification procedure to upload/download files

258 Views Asked by At

I'm trying to automate an upload process to pCloud. I already have a pCloud "App" with client ID and client Secret with All permissions (read, write, create, modify) and Allow implicit grant allowed with URI to http://localhost:65432/. All my API calls use the European eapi.

I tried to authenticate myself with pCloud API with username + password with no success: I get a message saying I can't authenticate myself because I have a double authentication method set. I found no mention of a double authentication argument, so I guess the API does not support it (yet?).

I later tried using tomgross's pcloud API. Authentication with email+password (specifying endpoint) does not succeed. I tried OAuth 2.0 procedure with app client ID and secret, but it opens a pCloud page displaying This 'redirect_uri' is not autorized....

I lastly tried using requests with the pCloud API documentation, but I do not manage to get a working code nor token to authenticate myself.

To summarize the full process, I would like to have a Python script run from github CI (headless) to upload files to a pCloud folder, and also have another Python function run by the client app that downloads the files from this pCloud folder. The folder should be only editable from the upload script to prevent the files from being changed by someone else.

0

There are 0 best solutions below