Hi everybody,
I am trying to receive an edit token for the MediaWiki 1.19 API, however all I get is an empty response.
I created a gist https://gist.github.com/tomschulze/16fcdf8b88f285ab29365e4e558cb5f5 with my python code. The script is successfully logging into the wiki using my admin credentials prior to sending the request for the edit token. The WRITE_API is enabled.
I read through the API docs <MediaWiki%20API%20edit%20token%20request%20empty%20response> and searched on stackoverflow. However, I could not find any answers. This is really bugging me...
What am I doing wrong, why is the server not responding with the edit token?
Kind regards,
Tom
On Tue, May 1, 2018 at 3:38 PM, tom schulze tom.schulze@posteo.de wrote:
I am trying to receive an edit token for the MediaWiki 1.19 API,
1.19 is really old. If this is your own wiki, you really should upgrade. If it's someone else's, you should encourage them to upgrade.
however all I get is an empty response.
I created a gist https://gist.github.com/tomschulze/16fcdf8b88f285ab29365e4e558cb5f5 with my python code.
You're missing parameters in params_edit_token. Try adding 'titles' with at least one title (doesn't have to exist) and 'intoken' with value 'edit'.
Usually a blank response means php fatal error. If it is your wiki, check you web server error log, and also see https://www.mediawiki.org/wiki/Manual:How_to_debug#PHP_errors
If its not your wiki, ask the owner of the wiki.
-- Brian
On Tue, May 1, 2018 at 7:38 PM, tom schulze tom.schulze@posteo.de wrote:
Hi everybody,
I am trying to receive an edit token for the MediaWiki 1.19 API, however all I get is an empty response.
I created a gist with my python code. The script is successfully logging into the wiki using my admin credentials prior to sending the request for the edit token. The WRITE_API is enabled.
I read through the API docs and searched on stackoverflow. However, I could not find any answers. This is really bugging me...
What am I doing wrong, why is the server not responding with the edit token?
Kind regards,
Tom
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org