nulldev

How to display packages in WEB?

0 votes
` var apiKey = "nulldev88"; $http({ url: "https://sandbox.esignlive.com/api/packages", method: "GET", headers: {'Content-Type':'application/json',"Authorization" : apiKey } }).success(function (data, status, headers, config) { console.log(data); }).error(function (data, status, headers, config) { console.log("error"); }); above is my code inside ANGULARJS [. .] please help me, i want to display the data inside my website, how can i achieve it? "apiKey" is just a sample, i have my real apiKey but im getting this response in the console: OPTIONS https://sandbox.esignlive.com/api/packages XMLHttpRequest cannot load https://sandbox.esignlive.com/api/packages. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://newbnb' is therefore not allowed access. The response had HTTP status code 401.

Reply to: How to display packages in WEB?

0 votes
I'm not too familiar with angularjs but it seems that you are not authenticating yourself properly to eSignLive. In your case, "https://sandbox.esignlive.com/api/packages" is not allowing your origin "http://newbnb" to have access to the response. Can you try setting your authorization header to: 'Authorization' : 'Basic ' + apiKey.
Haris Haidary OneSpan Technical Consultant

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off