NetSuite Token Based Authentication Test

Prerequisite: Setting Up A NetSuite Integration - Authentication

DemandCaster's NetSuite integration utilizes the following information to connect and pull data, sometimes these credentials will have problems with a script or simply not work. When we find that we can not connect in DemandCaster’s system we will look in a program called Postman (Postman, Inc. - to test the connectivity. The process below will help you to do similar tests.

Needed Information
NetSuite Help
NetSuite Login Account Typically this can be found in "Web Services Preferences" as "ACCOUNT ID"
Go to:
NetSuite Consumer Key
NetSuite Consumer Secret
If you do not have this information recorded it will need to be recreated/regenerated.
Go to:
NetSuite Token Id
NetSuite Token Secret
If you do not have this information recorded it will need to be recreated/regenerated.
Go to:
Download Postman

In your preferred web browser (Google Chrome, Safari, Firefox, Internet Explorer, Microsoft Edge) go to and download the appropriate installer (Windows users of newer computers should be 'Windows 64-bit') for your computer.

Setup Test Project - Get NetSuite Information
  • In your preferred web browser go to 
  • Login with an account that has access to SuiteScripts (if unsure talk to your NetSuite administrator)
  • While your navigation may differ you want to get to 'Script Deployments'
    • Customization -> Scripting -> Script Deployments
  • Once in 'Script Deployments' you can expand the 'Filters'
  • With the 'Filters' control expanded you will see options like below.
    • Type: RESTlet
    • API: 2.0 or 1.0
  • Depending on your NetSuite integration, this filtered list could still be large. You are looking at the 'SCRIPT' column for 'DemandCaster_Locations_2.0.js'
    • NOTE: It may also be listed as 'DemandCaster_Locations.js'
  • Click on the 'View' link next to that script and you should see something like below.
  • Take notice specifically of the 'EXTERNAL URL', you need to copy this full URL
Setup Test Project - URL and Parameters
  • Open Postman
  • When you first load Postman you will see something like below
  • In the 'Enter request URL' field paste the URL from the NetSuite deployment page.
    • You should see some parameters automatically created on the 'Params' tab
  • Verify the script value matches what is in NetSuite (It is rare for it to be different)
  • Verify the deploy value matches what is in NetSuite (It is rare for it to be different)
  • Create two new Key and Value combinations
    • Key: fromIndex
      • Value: 0
    • Key: toIndex 
      • Value: 10 (This number should at most be 1000)
  • After you add these new values you should see the URL is updated to include them.
    • NOTE: Take a moment to make sure there are no spaces in the URL as that will cause problems.
Setup Test Project - Authorization and Headers
  • Click on the 'Authorization' tab
  • Set the options on this tab similar to below.
  • After updating the fields, click on the orange 'Preview Request' button
  • Click on the 'Headers' tab and you will now see the authorization details are created for you.
  • Under the "Authorization" key type "Content-Type" and type "application/json" in the value box.
Setup Test Project - Save and Run
  • At this point click on the grey 'Save' button next to the blue 'Send' button.
  • Click on the blue 'Send' button
  • You will get a JSON formatted result of your request.
Postman - Errors

This section may get updated more in time.

Postman - Errors - Invalid Login Attempt

Should you receive an error like below, please go to the 'Params' tab and verify the information again.

Typically this is a problem with the token or consumer key but could also be a step of the Setting Up A NetSuite Integration - Authentication document that was not followed.

    "error": {
        "code": "INVALID_LOGIN_ATTEMPT",
        "message": "Invalid login attempt."
Click to copy