Dear community,
I have been stuck with this problem for quite sometime, I have been
trying to use the upload api and have tried the example specified on the
page. And I've been getting the error: badtoken and info: invalid token.
I couldn't get it to work. I have followed the said steps. First get the
token. The result was as follows.
{"query":{"normalized":[{"from":"Test_Page","to":"Test
Page"}],"pages":{"2":{"pageid":2,"ns":0,"title":"Test
Page","touched":"2012-06-05T16:09:33Z","lastrevid":2,"counter":3,"length":12,"new":"","starttimestamp":"2012-06-15T14:43:02Z","edittoken":"a25a10589a377fc4d75e5e0dcfb209c2+\\"}}}}
Then tried uploading the file.
$params = array(
'action' => 'upload',
'url' =>
'http://www.google.com/intl/en_ALL/images/logo.gif',
'token' =>
"a25a10589a377fc4d75e5e0dcfb209c2%2B%5C",
'format' => 'json'
);
I keep getting the error as follows.
{"error":{"code":"badtoken","info":"Invalid
token"}}
Where is it that I am going wrong ?
--
Regards,
Suryajith Chillara.