Roan,
Using cookies and last version of API modules found using URL http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/, query is now working fine.
Thanks for your help.
Marion Leclerc
Roan Kattouw roan.kattouw@home.nl Sent by: mediawiki-api-bounces@lists.wikimedia.org 26/11/2007 15:00 Please respond to MediaWiki API announcements & discussion
To: MediaWiki API announcements & discussion mediawiki-api@lists.wikimedia.org cc: bcc: Subject: Re: [Mediawiki-api] Action Query failed due to errorcode "inpermissiondenied"
marion.leclerc@orange-ftgroup.com schreef:
Then I try to retrieve the token of one page using query action with following parameters:
<WIKIURL>/api.php?action=query&titles=<PageName>&prop=info&intoken=edit&lgtoken=<LoginToken>&lgusername=<MyLogin>&lguserid=<LoginUserId>
You used the lg* parameters to stay logged in, which isn't possible any more due to security concerns. The docs hadn't been updated yet, I did so upon seeing your e-mail. The correct way to stay logged in is to fetch the cookies from the action=login request and pass them back to all subsequent requests. An example of how to do this in PHP using Snoopy is linked to from the External links section of the login documentation [1].
Roan Kattouw (Catrope)
[1] http://www.mediawiki.org/wiki/API:Login#External_links
_______________________________________________ Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-api