Does anyone have experiencing doing post-requests ...
# suitescript
w
Does anyone have experiencing doing post-requests to Suitelets that are 'Available Without Login'? I am using postman to attempt to post to a Suitelet that is available without login. I get the response 'Method Not Allowed'. After looking in SuiteAnswers, they say to add the header: User-Agent = Mozilla/5.0. After adding that, I am getting an HTML response which has the error 'An unexpected error has occurred. Please go back and try again.' I have log statements right at the beginning of the Suitelet, and there are zero logs in the Suitelet execution logs. Does anyone have any idea on how to debug this?
b
does the suitelet work using the internal url
w
yes it does
b
nothing weird on the deployment like the log level, audience, or status?
w
Nope, nothing weird there. It is a suitelet that we POST to on production all the time (from our business's website). I have the correct external URL (with our sandbox's hmac). Not quite sure how to proceed
My next step would be to reach out to our web developers to see how they are posting to it
b
try creating another deployment
and use that one
or if you really think the script does something weird, make a new suitelet that does nothing and try using postman with it
w
Thanks for the help, the problem was that I was using token authentication (with valid tokens), when that end point was not looking for any authentication. After removing authentication, the request worked.