This topic contains 5 replies, has 0 voices, and was last updated by seanlin816 9 years, 1 month ago.

  • Author
    Posts
  • #6841

    MBrewer2

    We 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.

  • #6842

    Olivier Gagnon NC

    From 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.

  • #6843

    MBrewer2

    Thanks Olivier!

    What value should be included to define a post within the URL?

  • #6844

    Olivier Gagnon NC

    You 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

  • #6845

    MBrewer2

    For 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!

  • #6846

    seanlin816

    I 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.

You must be logged in to reply to this topic.