ChimekKoo / pylibrus

Librus (polish school e-register) unofficial API client written in Python.
https://pypi.org/project/pylibrus/
MIT License
1 stars 0 forks source link

Unexpected problem with password auth #1

Open ChimekKoo opened 1 year ago

ChimekKoo commented 1 year ago

Recently authorization stopped working, probably they ended password grant type support or done something to the API key I'm using here. API response when trying to get access token using user credentials:

400 Bad Request
 {"error": "unsupported_grant_type"}

I can't do much about it.

(https://github.com/lomber1/py-librus-api which uses the same Librus API also stopped working)

dani3l0 commented 1 year ago

Hello, I had the same problem in my project at the end of January. And it was using the same auth method as yours.

I captured all the requests while logging in to Librus React web ui, and managed to successfully repeat the process in my code. Basically, I've rewritten the whole auth (commit, code). We now have to make just 5 requests to login properly xD.

Those are the login steps:

Librus seemed to be cleaning up their API during the winter break.

ChimekKoo commented 1 year ago

Wow thanks a lot. I'll implement it soon.