Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Calling a RESTlet From a 3rd Party Site
As the title states, I'm trying to call a RESTlet from a 3rd party site. Since this is new for me, I'm trying to keep it simple to start. I'm following the NetSuite documentation (including the JavaScript code here), but I can't get it to work. Currently, I'm getting a permissions error:
[CODE]XMLHttpRequest cannot load https://xxxxxxxxxxx. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxxxxx' is therefore not allowed access. The response had HTTP status code 401.[/CODE]
So what am I doing wrong? Here's the HTML for the scripts on my page:
[CODE]XMLHttpRequest cannot load https://xxxxxxxxxxx. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxxxxx' is therefore not allowed access. The response had HTTP status code 401.[/CODE]
So what am I doing wrong? Here's the HTML for the scripts on my page:
Tagged:
0