-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: Have ability to run pcloud on headless server/terminal #48
Comments
You can use username/password authentication (see https://github.com/tomgross/pycloud#usage-of-api) instead of OAuth 2.0 authentication. What you can try is to generate an access token somehow and pass it to PyCloud directly. As documented, the access token currently will not expire (see https://docs.pcloud.com/methods/oauth_2.0/) >>> access_token = "..."
>>> pc = PyCloud("", access_token, oauth2=True) |
Is there a way to get the browser redirect address and then the user can plug that into a webbrowser? Then take the token code and paste it back into the script on the command line and then it gets the access_token that way? That is how some of the other cloud-type scripts work to gain access via command line. |
I've been looking at your code and would you entertain a PR that would give the user the ability to run this on a headless server, the script outputs the link to input into a browser (laptop) and then the access token that is returned from the request_uri can be pasted back into a users script of pycloud that authenicates them...? This is done this way in a few different scripts I've seen that interacts with box.com, dropbox, etc, but on a headless server and you do any webbrowsing interaction on another computer (laptop/desktop)... |
Hi to use a headless-type server..I've created a script that includes a TokenHandler class in the same file as my script but when I pass my TokenHandler into
I get a
I know this might be more of a python-type question, but I thought you may be able to help me out faster as I don't have the most experience with python and classes, etc. |
In order for the user to create their own TokenHandler class, I think you need to make the |
you can disregard the above two comments. I figured out after. |
Tried pcloud using oauth, which works fine, but then the API is looking for a firefox browser or similar on a desktop/GUI. The script should be able to run within console/terminal (headless server). See output below:
The text was updated successfully, but these errors were encountered: