views:

168

answers:

1

Hello,

I want to get an edit token via a HTTP POST command. The API documentation says only

Edit token. You can get one of these through prop=info

Using action=query&prop=info&titles=Main Page&intoken=edit does not give me a token.

How to get it?

+1  A: 

The following works for me (as described at http://www.mediawiki.org/wiki/API:Edit_-_Create%26Edit_pages#Token):

http://en.wikipedia.org/w/api.php?action=query&prop=info&intoken=edit&titles=Sandbox

Joshua C. Lerner
Thank you! It was my fault: Had a problem while logging in. Edit tokens are only created for logged in users. ;-)
Stefan