Noticed something today, when someone asked me how to use the API to login... The docs at http://en.wikipedia.org/w/api.php (just for instance, I know it generally run the latest) say:
* action=login (lg) * This module is used to login and get the authentication tokens. In the event of a successful log-in, a cookie will be attached to your session. In the event of a failed log-in, you will not be able to attempt another log-in through this method for 5 seconds. This is to prevent password guessing by automated password crackers. Parameters: lgname - User Name lgpassword - Password lgdomain - Domain (optional) Example: api.php?action=login&lgname=user&lgpassword=password
Probably should remove the "example" link and specify that it only works via HTTP POST now :) As:
<?xml version="1.0" encoding="utf-8"?> <api> <error code="mustbeposted" info="The login module requires a POST request">
Thanks!
SQL
SQL schreef:
Probably should remove the "example" link and specify that it only works via HTTP POST now :) As:
<?xml version="1.0" encoding="utf-8"?>
<api> <error code="mustbeposted" info="The login module requires a POST request">
We strive to provide examples for all modules, even mustbeposted ones. It would be nice to mention that in the docs, though, I'll add that.
Roan Kattouw (Catrope)
Roan Kattouw schreef:
It would be nice to mention that in the docs, though, I'll add that.
Did that in r32418 [1].
Roan Kattouw (Catrope)
[1] http://svn.wikimedia.org/viewvc/mediawiki/?view=rev&revision=32418
mediawiki-api@lists.wikimedia.org