Clientlogin web service API

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

Clientlogin web service API

Ren Wang
I have posted a similar message on the Wikimedia Developer Support, but
I still can't get my code running, here is my original post:

"I am writing a code to use the MediaWiki web service API to login to
the system. Based on the online API documentation, I used “action=query”
to get a login token and “action=clientlogin” to post the login request,
but I got “Invalid CSRF token” error. I am not sure what I missed, is
there a clientlogin sample code, either html or php or any format?"

My code is JavaScript running in the browser, let me know if anyone
wants to take a look of my testing code.

Regards,

Ren




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

Re: Clientlogin web service API

geoffreydebelie
Hi,

The example for Bash is here:

Kind regards
Geoffrey De Belie


---- On do, 22 feb 2018 04:51:36 +0100 Ren Wang <[hidden email]> wrote ----

I have posted a similar message on the Wikimedia Developer Support, but
I still can't get my code running, here is my original post:

"I am writing a code to use the MediaWiki web service API to login to
the system. Based on the online API documentation, I used “action=query”
to get a login token and “action=clientlogin” to post the login request,
but I got “Invalid CSRF token” error. I am not sure what I missed, is
there a clientlogin sample code, either html or php or any format?"

My code is JavaScript running in the browser, let me know if anyone
wants to take a look of my testing code.

Regards,

Ren




_______________________________________________
Mediawiki-api mailing list



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