Hello everyone,
I am trying to login using action=clientlogin via javascript Ajax call and backend as well but for some reason I am always getting same error { "code": "badtoken", "info": "Invalid CSRF token.",....} If I use same parameters and call from POSTman it works and I get logged in.
What could be wrong? Am I missing something thats not required by call from POSTman. I also posted the same question on API talk https://www.mediawiki.org/wiki/API_talk:Login#action.3Dclientlogin
This is the link to the code for reference Link to github java code https://github.com/Institute-Web-Science-and-Technologies/okb-toollabs/blob/master/humavar/authentication/src/main/java/com/authentication/auth.java
Thank you, Mujtaba Rafiq