hfaran / piazza-api

Unofficial Client for Piazza's Internal API
https://hfaran.github.io/posts/reverse-engineering-piazzas-api/
MIT License
185 stars 54 forks source link

Unable to login with p.user_login() #64

Closed j-beastman closed 1 year ago

j-beastman commented 1 year ago

Here's the traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/johneastman/.pyenv/versions/TABot/lib/python3.10/site-packages/piazza_api/piazza.py", line 22, in user_login
    self._rpc_api.user_login(email=email, password=password)
  File "/Users/johneastman/.pyenv/versions/TABot/lib/python3.10/site-packages/piazza_api/rpc.py", line 78, in user_login
    raise AuthenticationError("Could not authenticate.\n{}"
piazza_api.exceptions.AuthenticationError: Could not authenticate.
{'result': None, 'error_codes': [], 'error': 'Request not valid', 'aid': 'llqqes5ni9170'}

I'm positive that the credentials are correct.

savantes1 commented 1 year ago

I'm having the exact same problem. Me thinks Piazza may have changed their login API :(

j-beastman commented 1 year ago

hmm, I'm unfamiliar with how @hfaran 's package works honestly. Any ideas on how we could get it operational again?

savantes1 commented 1 year ago

I've actually already implemented a fix on my local computer. I'll try to put together a pull request soon so @hfaran can review and merge so others can keep using this library

savantes1 commented 1 year ago

I put in the pull request in case you want to take a look: https://github.com/hfaran/piazza-api/pull/65

hfaran commented 1 year ago

@savantes1 thanks a lot for the fix - just left one comment otherwise looks good. I should be able to publish a new version after the long weekend (and your PR is in).

savantes1 commented 1 year ago

No prob, I made another commit based on your comment

hfaran commented 1 year ago

Fix merged, and new version released, closing