INVALID API VALIDATION ERROR
i am getting invalid api validation error..
the code what i have written is...
<?php echo"<form action='http://www.slideshare.net/api/1/upload_slideshow' method='post' ENCTYPE='multipart/form-data?>";
echo"username:<input name="username" type="text" /><br />";
echo"password:<input name="password" type="password" /><br />";
$ts=time();
$api_key='N7BBoxsa';
$hash=eDlUiCYC."$ts";
$slideshow_title=" api-conference-2008";
echo"<input name="api_key" type="hidden" value="$api_key" /><br />";
echo"<input name="ts" type="hidden" value="$ts" /><br />";
echo"<input name="hash" type="hidden" value="$hash" /><br />";
echo"<input name="slideshow_title" type="hidden" value="$slideshow_title" /><br />";
echo"<input name="slideshow_srcfile" type="file" /><br />";
echo"<input name="slideshow_description" type="hidden" />" ;
echo"<input name="submit" type="submit" value="submit" />";
echo"";
the code what i have written is...
<?php echo"<form action='http://www.slideshare.net/api/1/upload_slideshow' method='post' ENCTYPE='multipart/form-data?>";
echo"username:<input name="username" type="text" /><br />";
echo"password:<input name="password" type="password" /><br />";
$ts=time();
$api_key='N7BBoxsa';
$hash=eDlUiCYC."$ts";
$slideshow_title=" api-conference-2008";
echo"<input name="api_key" type="hidden" value="$api_key" /><br />";
echo"<input name="ts" type="hidden" value="$ts" /><br />";
echo"<input name="hash" type="hidden" value="$hash" /><br />";
echo"<input name="slideshow_title" type="hidden" value="$slideshow_title" /><br />";
echo"<input name="slideshow_srcfile" type="file" /><br />";
echo"<input name="slideshow_description" type="hidden" />" ;
echo"<input name="submit" type="submit" value="submit" />";
echo"";
1 person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
-
Inappropriate?Try this code. It works. Paste it into a simple HTML file and open it in your browser. Remember that when uploading files, the enctype='multipart/form-data' is required.
<form>
<input name="api_key" type="hidden" value="api_key" />
<input name="ts" type="hidden" value="ts" />
<input name="hash" type="hidden" value="hash_for_above_ts" />
<input name="username" type="hidden" value="username" />
<input name="password" type="hidden" value="password" />
<input name="slideshow_title" type="hidden" value="Whatever title" />
<input name="slideshow_srcfile" type="file" />
<input type="submit" value="Submit" />
</form>
In the form tag, use the following parameters:
action="http://www.slideshare.net/api/1/upload_slideshow"
method="post"
enctype='multipart/form-data' -
Inappropriate?i did what you suggested.but it is gain giving the same error...
<slideshareserviceerror>
<message>1: Failed API validation</message>
</slideshareserviceerror>
i am posting my new code..pls tell where the problem is.
<html>
<body>
<form>
<input name="api_key" type="hidden" value="N7BBoxsa" />
<input name="ts" type="hidden" />
<input name="hash" type="hidden" />
<input name="username" type="hidden" value="myname" />
<input name="password" type="hidden" value="mypassword" />
<input name="slideshow_title" type="hidden" value="title" />
<input name="slideshow_srcfile" type="file" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
i have used this with form tag
action="http://www.slideshare.net/api/1/upload_slideshow" method="post" enctype="multipart/form-data"> -
Inappropriate?Have you applied for an API key on Slideshare? From your code it seems you are not really passing the timestamp and hash at all! Apart from a username and password, you also need a secret key and shared secret.
-
Inappropriate?ya i have applied for the key.
i m also having the secret key...i am concatinating it with ts(unix time).and sending it... i am calculating unix time(ts)...and hashing it with secret key to get (hash)...
hash=secret+ts.
Loading Profile...




EMPLOYEE