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

How to use this within python? #11

Open
bobbintb opened this issue Aug 20, 2021 · 1 comment
Open

How to use this within python? #11

bobbintb opened this issue Aug 20, 2021 · 1 comment

Comments

@bobbintb
Copy link

I am trying to get this to work in python instead of cli but this simple test isn't working.

import ptpapi

connection = ptpapi.login(username='username',passkey='xxxxxxxxxxxxxxxxxxxxxxxxxx')
print(connection.current_user())

Running the above just once locks me out of PTP:
Your popcorn quota has been reached, come back later!

@kannibalox
Copy link
Owner

You also need the password in addition to the passkey, or preferably, use the much more secure (but a little more limited) ApiUser/ApiKey system. There are also built-in protections against triggering the popcorn quota, but there's no way for it to account for requests from any other automation. The scripts provided should

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