This topic contains 5 replies, has 0 voices, and was last updated by seanlin816 9 years, 1 month ago.
-
AuthorPosts
-
September 25, 2015 at 2:06 pm #6841
MBrewer2We have created a RESTlet script which is able to handle JSON posts from third-party applications such as Postman and Advanced Rest API. However, when attempting to send data via URL, we are receiving:
{“result”:”The remote server returned an error: (400) Bad Request.”} The URL which data will post from is formatted like so: http://DATAENDPOINT.com&url=https://…,nlauth_role=3
If I change a character in e-mail/signature, I receive:
{“result”:”The remote server returned an error: (401) Unauthorized.”} I have opened a case and have also exhausted all available web/NetSuite resources… can anyone provide some insight as to what may be missing from our URL string? Thanks!
This is a cached copy. Click here to see the original post. -
September 28, 2015 at 5:07 am #6842
Olivier Gagnon NCFrom what I can tell, you’re passing the Auth as a GET parameter. It needs to be passed as Header information in a POST, not a GET.
-
September 28, 2015 at 7:40 am #6843
MBrewer2Thanks Olivier!
What value should be included to define a post within the URL?
-
September 28, 2015 at 10:37 am #6844
Olivier Gagnon NCYou should be able to find the information you need under the following Help path: SuiteCloud (Customization, Scripting, and Web Services)SuiteScriptUnderstanding NetSuite Script TypesRESTletsWorking with RESTlets
-
September 29, 2015 at 6:30 am #6845
MBrewer2For anyone who stumbles upon this; my original request was unable to reach resolution.
The solution we’ve implemented was to create a Suitelet to pull the data from the external resource which then passes the data to the Restlet.
Thanks again, Olivier!
-
September 29, 2015 at 11:48 am #6846
seanlin816I don’t know if you can use URL to post the header information (Authentication information), I always include the authentication in the header section.
From security stand point, if you are using URL to send the authentication information, it would be a very huge security breach.
-
AuthorPosts
You must be logged in to reply to this topic.