I am trying to make a script to move files from local wikipedia to commons
but is getting an invalid token error. I could not search the archives and
see whether this has been addressed before.
Here is what I am trying to do.
1) Get token using the following api
http://commons.wikimedia.org/w/api.php?action=query&prop=info&title…
Result:
<api>
<query>
<pages>
<page pageid="10307065" ns="14"
title="Category:Commons-ml" touched="
2011-03-14T05:01:24Z" lastrevid="49830005" counter=""
length="728"
starttimestamp="2011-03-25T13:16:52Z" edittoken="
5b0b59cdc36f85c8a16b35acbb714189+\"/>
</pages>
</query>
</api>
2) Post an image using the following api.
http://commons.wikimedia.org/w/api.php?action=upload&filename=Kerala_Ne…
Response
<api servedby="srv214">
<error code="badtoken" info="Invalid token"/>
</api>
I am not sure whats wrong with my token here. Please advice. I dit he
posting using a dot net program after including "multipart/form-data" in the
header.
Thanks,
Sreejith K.