MediaWiki API v1.19.7; edit token request; empty response

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MediaWiki API v1.19.7; edit token request; empty response

tom schulze

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
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki API v1.19.7; edit token request; empty response

Brad Jorsch (Anomie)
On Tue, May 1, 2018 at 3:38 PM, tom schulze <[hidden email]> 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 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'.


--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki API v1.19.7; edit token request; empty response

bawolff
In reply to this post by tom schulze
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 <[hidden email]> 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
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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