I am using Java to work with the mediawiki Api. We would like to add login to our queries. Using a post routine, I entered api.php?action=login&lgname=username&lgpassword=password.
I retrieved the information including lgtoken. I add lgtoken=... to the end of my query and receive the following error:
<error code="unknown_action" info="Unrecognized value for parameter 'action': query" />
If I have "$wgGroupPermissions['*']['read'] = true" I receive no error.
I have read about the login, and it looks like I may need to use cookies. I would prefer not using cookies, but if I have to, I am not sure what to use.
Thanks,
Mary Beebe
2009/4/27 Beebe, Mary J BeebeM@battelle.org:
I am using Java to work with the mediawiki Api. We would like to add login to our queries.
Using a post routine, I entered api.php?action=login&lgname=username&lgpassword=password.
I retrieved the information including lgtoken. I add lgtoken=… to the end of my query and receive the following error:
Simply adding lgtoken= to the end of your query is not good enough, you have to send cookies. For more details, please refer to the documentation at MediaWiki.org [1].
Roan Kattouw (Catrope)
mediawiki-api@lists.wikimedia.org