I seem to run into this every time I write a new script (mostly Suitelets). There's no rhyme or reason to fixing it. Most of the time, it just seems to be fixed by following the same steps I did before it broke.
I write my script. Nothing fancy. Mostly just executing saved item searches and returning JSON or XML. I create the script record. I deploy the record, making sure to check "Available Without Login", executing as my current role (admin) and selecting all roles under "Audience". I save to deploy. The internal URL works fine. Yay!. The External URL? "You do not have privileges to view this page" error. EVERY. DAMN. TIME.
I fiddle with it and try every combination of settings I can think of. I reference other scripts that are currently working and match their settings exactly. Same error.
What am I doing wrong here? I just want a simple Suitelet to be accessible via that external URL, run an item search and return some JSON/XML. Is that really so much to ask?