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&lgname=NewUserName&lgpassword=SuperSecretPassword&lgtoken='

...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&lgname=NewUserName&lgpassword=SuperSecretPassword&lgtoken=<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




_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to