then I get the xml back
... <page ns="0" title="mynewpage" missing="" starttimestamp="2013-09-26T21:38:59Z" edittoken="396fb7fbd9a308620d460e92e611d100+\" /></pages> ...
So I extract this edittoken-element and simply create a new page.
($newtoken=edittoken)
wget --http-user=myuser --http-password=mypwd --header="Content-Type: application/x-www-form-urlencoded" "
https://localhost/wiki/api.php" --post-data "action=edit&title=mynewpage&text=test&token=$newtoken"
I get back:
error code="badtoken" info="Invalid token"
After investigation I found a webpage
https://www.mediawiki.org/wiki/API:Edit
which describes the token characters (The token that you received is terminated with
+\
, this needs to be urlencoded (so it will end with
%2B%5C
) before it is passed back)
I tried it with this hint and without it.... but with no success....
I also tried to do a normal login (action=login) but it does not help.
For information... my user does not have any password because of active directory authentication by the webserver. So I can not add the parameter lgname=myuser&lgpassword ....
Please can you help me?
Thank you very much!
Andreas