Open AdSvS opened 8 years ago
On https://www.mediawiki.org/wiki/API:Login this is documented.
Okay, just by reading "...In MediaWiki versions before 1.27, only the login action is available and should be used by all clients needing to login. As of 1.27, the login action should only be used in combination with bot passwords, and clientlogin should be used by interactive applications...." gives me the shivers as it means you require different methods with different MW versions.
Trying to make a sane interface out of this is not going to happen overnight and ranks fairly low on my priority list as its smells to be of some sort of spaghetti code.
I'm leaving the issue open in case someone wants to tackle this.
I'm not sure I agree. My interpretation is that using the 'login' action (in combination with bot passwords) is the appropriate way for this use case and will work for MW 1.27 as well as older versions. So no shivers here yet and only spaghetti bolognese :-)
If a login action was also possible in combination with bot passwords prior to MW 1.27 then supporting two different methods will not be an issue. In this case the other method would just not be supported for earlier versions of MW. Also MW 1.26 is EOL in November 2016 and MW 1.23 is EOL in May 2017 so there is no real pressure to support pre MW 1.27 methods.
Still an enhancement like this takes time and effort which needs to be allocated somehow by someone at some time.
Still an enhancement like this takes time and effort which needs to be allocated somehow by someone at some time.
Exactly.
In the meantime, the error output in Special:Ask
has been improved to display failed responses more clearly.
[0] discussion provides some insides about the "How to login with API?"
[0] https://lists.wikimedia.org/pipermail/wikitech-l/2016-September/086434.html
WikiWorks is working on a solution for this issue. We should have something shortly.
This very interesting extension works only with public wiki's. For a query to work on a private wiki a login is needed.
On https://www.mediawiki.org/wiki/API:Login this is documented.
Attached is code that creates pages in a wiki from email messages. It contains code for login as well, so it might be used as an example.
EmailBot.zip