You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"}
Hello, I had the same problem in my projectat 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:
[GET] https://api.librus.pl/OAuth/Authorization?client_id=46&response_type=code&scope=mydata - initialize session? save some cookies? idk, but seems to be needed
[POST] https://api.librus.pl/OAuth/Authorization?client_id=46 - the actual login, form data with login & password. Some cookie is saved, but hold on, you don't have access to anything.
[GET] https://api.librus.pl/OAuth/Authorization/Grant?client_id=46 - here we get our access token (as cookie). While we can get HTML contents of the webpage, API still cannot be accessed.
Activating the API. Don't ask me how and why does it work, I have really no idea what is happening in Librus backend (just like its devs I guess).
[GET] https://synergia.librus.pl/gateway/api/2.0/Auth/TokenInfo - here we get some weird User Identifier, which is required in next step.
[GET] https://synergia.librus.pl/gateway/api/2.0/Auth/UserInfo/{Identifier} - does not return anything useful. However, after this request API starts working.
Librus seemed to be cleaning up their API during the winter break.
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:
I can't do much about it.
(https://github.com/lomber1/py-librus-api which uses the same Librus API also stopped working)
The text was updated successfully, but these errors were encountered: