Login Page when Requesting SuiteLet from script
Hello everyone!
I have two separate uses cases where I need to call a SuiteLet from a script, in one case it’s a Client Script and the other is a User Event script. In both cases after requesting the SuiteLet resource the response is the NetSuite Login page (i.e., authentication issue).
What I’ve checked:
- SuiteLet is Released
- SuiteLet audience is set correctly
- SuiteLet is NOT configured to be available without login (this shouldn’t be necessary)
- UE script is running as Administrator (I’m also testing as Administrator)
Here’s the code requesting the SuiteLet (POC-level code, final code will use url.resolveScript, etc.)
const response = https.get({
url: 'https://0000000-sb2.app.netsuite.com/app/site/hosting/scriptlet.nl?script=2708&deploy=1'
})
That code results in the following response (truncated to keep post short):
<!doctype html> <html> <head> <title>NetSuite Login</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name...
When I request the SuiteLet in the browser using the same URL it works fine, but when requested from UE script it results in the login page.
I know I’ve successfully done something similar in the past, but I can’t remember what was needed to make this work.
Anyone have any ideas for me to check?




