Last modified: 2009-12-30 05:20:31 UTC
The API does not return an edit token for nonexistent pages when logged in. This makes it impossible to get an edit token for the creation of new pages without resorting to screen scraping(such as for a bot). When logged out it returns +\.
*** Bug 11017 has been marked as a duplicate of this bug. ***
Since edit tokens are the same for each page, but only differ per session (i.e. they only change between logins), you can just request an edit token for a page you know exists (try Main Page) as a temporary measure. I'll work on getting tokens to work for non-existent pages, but since the computer that stores my SVN stuff is temporarily unavailable, it may take some time.
Fixed in r23457
Whoops, that has to be r25457. Sorry.
Does still not work: http://commons.wikimedia.org/w/api.php?action=query&prop=info&intoken=edit&titles=Main%20Pageeeeee. Wikimedia appears to be running $Id: ApiQueryInfo.php 25457 2007-09-03 20:17:53Z catrope $.
It did work, but only if at least one existing title was specified. Fixed this in r25581 by adding a '&'.