My website URL is: secureserver[dot]domains2go[dot]us/parth/
What I’m seeing is: I am trying to use an API on my site that can only be accessed by whitelisted APIs and so I have whitelisted the IP: 126.96.36.199, but the XML still can’t be accessed.
This is the error in the console:
Access to XMLHttpRequest at ‘https://test.httpapi.com/api/resellers/promo-details.json?auth-userid=769672&api-key=uqgiG4K6TqyxhdIq8wIpiheMC7zkJznP’ from origin ‘http://secureserver.domains2go.us’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I’m using this software: JSON & XML
Additional information: Using Chrome, HTML, JS, Jquery, XML, JSON.
This is not a restriction on your website (or the hosting powering it) but rather on the site/hosting of test.httpapi.com.
This is not going to work (or should not be done) because:
- The API blocks AJAX requests from other domains, because it’s not intended for browser access.
- The API requires an IP whitelist. If you try to execute this request from the visitor’s browser, the connection will originate from the visitor’s browser, device and network, not from your hosting account.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.