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

This is the link to the code for reference
Link to github java code

Thank you,
Mujtaba Rafiq