Programmatic login?

I have programs that push data to backend pages, which then add this data to XWiki objects that are used as a database. So I need edit rights. How to log in on the wiki programmatically? I opened dev tools on the login page and logged in and checked what arguments are passed on the post request, they are: j_username, j_password, j_rememberme, but then also form_token, srid and xredirect.
I tried with just j_username, j_password, j_rememberme, because I can hardcode those, but it doesn’t seem to work. Do I also need to necessarily pass form_token, srid and xredirect to successfully log in? I checked the html and I can get this information from the html and that’s what I’m going to try next.

You can do it with REST API, have you tried it?

1 Like

Thanks that worked.