I am trying to upload a file in Crocodoc as below
$(function() { $("#btn").click(function(){ $.ajax({ type:"POST", url:"https://crocodoc.com/api/v2/document/upload?token=XYZ&url=http://web.crocodoc.com/files/test-simple.pdf", success:function(data){ alert("ok"+data); }, error:function(data) { alert("failed"+data.error); } }) }); });
In firebug i see a "401 UNAUTHORIZED" error.What is the problem pls help.I am passing the correct token key