I couldn't find any relevant documentation for this particular case, so I'm hoping someone on the list might be able to point me in the right direction...
If I want to l create a new user account via the Mediawiki API, I might issue an initial request for a token like this:
curl -c cookies.txt -X POST 'http://en.wikipedia.beta.wmflabs.org/w/api.php?action=login&format=json&...'
...and then submit the actual request to create the account with the valid token obtained in the previous step:
curl -b cookies.txt -X POST 'http://en.wikipedia.beta.wmflabs.org/w/api.php?action=login&format=json&...<token_goes_here>'
My problem is that some wikis require a captcha for account creation, so that second request gets a response like this:
{"servedby"=>"deployment-apache33", "error"=>{"code"=>"Incorrect or missing CAPTCHA.", "info"=>"<Incorrect or missing CAPTCHA.>"}}
I'm don't know how to deal with the captcha requirement via my API calls. Does anyone know if that is possible with a "createaccount" request, and if so, how does that work?
Thanks,
Jeff
On Fri, Jan 3, 2014 at 9:25 PM, Jeff Hall jhall@wikimedia.org wrote:
I'm don't know how to deal with the captcha requirement via my API calls. Does anyone know if that is possible with a "createaccount" request, and if so, how does that work?
It is not currently possible, and is filed as bug 46072.[1] There was some work done towards fixing it (as noted in that bug report), but it unfortunately hasn't been followed up on.
[1]: https://bugzilla.wikimedia.org/show_bug.cgi?id=46072
mediawiki-api@lists.wikimedia.org