This is an archived forum post. The information may be outdated. Contact us if you have any questions.

API authentication does not work

meediake wrote on 2013-01-25:
Hey!

I wanted to ask, how this API works?
I tried the following:

POST request to the url:
http://pdfcrowd.com/api/pdf/convert/uri/

as the content type must be URL encoded, I added the header:
Content-type: application/x-www-form-urlencoded

And post data itself:
src%3Dhttp%3A%2F%2Fwww.google.com%26username%3Dmyusername%26key%3Dmykey

And it does not work, it gives me the "Missing username and/or api key" error.
support wrote on 2013-01-25:
Try the following HTML code:
<form action="http://pdfcrowd.com/api/pdf/convert/uri/" 
      method="post">
  <input type="hidden" name="username" value="USERNAME" />
  <input type="hidden" name="key" value="APIKEY" />
  URL: <input type="text" name="src" value="http://google.com"/><br />
  <input type="submit" value="Create PDF" />
</form>

(Do not forget to replace USERNAME and APIKEY with your credentials)