How can I get request from RESTlet script

I want to get request from external url RESTlet script, I do all steps and I am using postman to test my api.

I am using the following external url:

https://<ACOUNT_ID>.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=####&deploy=#&recordtype=######&id=####

I using the below info in Headers tap in postman:

Authorization: NLAuth nlauth_account=<ACOUNT_ID>, nlauth_email=<USER_EMAIL>, nlauth_signature=<USER_PASSWORD>

Content-Type: application/json

and using no auth in Authorization tap

and I get the following error:

{
    “error”: {
        “code”: “INVALID_LOGIN_CREDENTIALS”,
        “message”: “Plaintext credentials authentication is deprecated for new restlets.”
    }
}

 

Rookie Asked on November 1, 2021 in How To's.
Add Comment
1 Answer(s)

As of the latest release, the NLAuth format for Restlet authentication is no longer accepted, which is why you are receiving that error message.  You must use what NetSuite calls Token-based Authentication, which is really just OAuth 1.0

Postman supports OAuth 1.0, so it should be just a simple matter of setting up your access tokens in NetSuite, then changing the Authorization type in Postman and filling in the correct values, including the realm.

Beginner Answered on November 1, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor