This article is a simple tutorial of how to test NetSuite RESTlet scripts that use Token-based Authentication with the help of a third-party app, Postman.
As a prerequisite, make sure that the Token-based Authentication feature found at: Setup > Company > Enable Features > SuiteCloud is enabled in order to for you to proceed with the other steps.
I. Acquiring the Consumer Key and Consumer Secret
- Go to Setup > Integrations > Manage Integrations > New.
Image 1: Setup > Integrations > Manage Integrations > New Image 2: Consumer Key/Consumer Secret Image 3: External URL - Enable Token-based Authentication.
- You will receive the following message, along with the Consumer Key and Consumer Secret. Save it somewhere secure.
Warning: For security reasons, this is the only time that the Consumer Key and Consumer Secret values are displayed. After you leave this page, they cannot be retrieved from the system. If you lose or forget these credentials, you will need to reset them to obtain new values. Treat the values for Consumer Key and Consumer Secret as you would a password. Never share these credentials with unauthorized individuals and never send them by email.
II. Acquiring the Token ID and Token Secret
- If your role is granted with User Access Token permission, you should be able to see Manage Access Tokens inside the Settings portlet.
Image 4: Manage Access Tokens - Click on New My Access Token.
- Select an Application Name and enter your preferred Token Name.
Image 5: Naming - Click āSaveā.
- You will see this message, along with Token ID and Token Secret. Save the Token ID and Token Secret to somewhere secure.
Warning: For security reasons, this is the only time that the Token ID and Token Secret values are displayed. After you leave this page, they cannot be retrieved from the system. If you lose or forget these credentials, you will need to reset them to obtain new values. Treat the values for Token ID and Token Secret as you would a password. Never share these credentials with unauthorized individuals and never send them by email.
III. Creating your first RESTlet collection in Postman
- Go to https://www.getpostman.com/ to download the Postman application.
- After installing, create a New Collection.
- After creating a new collection, create your first request by clicking on Add requests .

IV. Testing your first RESTlet in Postman
Follow the steps as depicted in the screenshot below.

- Select the appropriate request method (e.g. GET, POST, etc.).
- Enter the URL as grabbed from the deployment record. For more information on deploying your first RESTlet, go to this article.
- Click on Authorization.
- Select OAuth 1.0.
- Enter the following parameters:
- Consumer Key (from Section I, Step 3)
- Consumer Secret (from Section I, Step 3)
- Access Token (from Section II, Step 6)
- Token Secret (from Section II, Step 6)
- Enter the NetSuite Account ID under Advanced > Realm
- Hit Save so you wonāt lose the request you configured.
- Click on Send to test!
LEACC Consulting is a team of NetSuite Certified Developers with IT experience solely dedicated to NetSuite technologies for eight years. We are experts in both SuiteScript 2.0 and SuiteScript 1.0. Our team has worked with 400+ NetSuite scripts and workflows combined. If you need some consulting help of how you can design your NetSuite scripts better, contact us by filling out this form or by commenting below.
Love this epic topic š
Important to note that the latest version of Postman will not by default set the āAdd authorization data toā dropdown to request headers by default on a GET request.