Skip to content
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

Can't upload file with OAuth authentication #55

Closed
giust opened this issue Dec 14, 2021 · 1 comment
Closed

Can't upload file with OAuth authentication #55

giust opened this issue Dec 14, 2021 · 1 comment

Comments

@giust
Copy link
Contributor

giust commented Dec 14, 2021

Hi,

I can use OAuth authentication with pc = PyCloud("", "LecVZx4nurbtMY1BZUkjfi7ZTyW7azxsy6SyO0j3pJXGRjIMPOdy", endpoint="eapi", oauth2=True). This works on some methods, such as userinfo() and listfolder(folderid=0). However it doesn't with uploadfile(), I get the error {'result': 2000, 'error': 'Log in failed.'}. Inspecting the code it seems that the method uploadfile() is using auth_code, which is initialized empty when using OAuth authentication. Is it possible to use uploadfile() with OAuth authentication?

Thanks!

@tomgross
Copy link
Owner

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants