Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The NetSuite Pro

The NetSuite Pro Logo The NetSuite Pro Logo

The NetSuite Pro Navigation

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Home/ NetSuite RESTlet & REST API Tutorials/Calling a NetSuite RESTlet from External Systems (Postman, Python, Node.js)

Calling a NetSuite RESTlet from External Systems (Postman, Python, Node.js)

Once your NetSuite RESTlet is deployed, the next step is calling it from external systems. In this tutorial, you’ll learn how to authenticate and send requests to your RESTlet using three popular tools: Postman, Python, and Node.js.

Authentication Overview

NetSuite RESTlets require authentication. The two main methods are:

  • Token-Based Authentication (TBA) β€” uses consumer key/secret and token key/secret to generate an OAuth 1.0a signature.
  • OAuth 2.0 β€” the modern approach using client credentials and bearer tokens.

In this tutorial, we’ll use TBA (OAuth 1.0a) since it’s the most widely used method for RESTlet integrations.

Your RESTlet URL

Your RESTlet URL follows this format:

https://[account-id].restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=[script-id]&deploy=[deploy-id]

Find this URL in NetSuite under Customization > Scripting > Script Deployments > [your deployment] > External URL.

Method 1: Calling a RESTlet with Postman

Postman is the easiest way to test your RESTlet.

Step 1: Install the NetSuite Auth Helper (or use manual OAuth 1.0)

  1. Open Postman and create a new request.
  2. Set method to GET and paste your RESTlet External URL.
  3. Go to the Authorization tab.
  4. Select OAuth 1.0 as the type.
  5. Fill in the fields:
    Consumer Key: [your TBA consumer key]
    Consumer Secret: [your TBA consumer secret]
    Access Token: [your TBA token key]
    Token Secret: [your TBA token secret]
    Signature Method: HMAC-SHA256
  6. Click Send.

Adding Query Parameters (GET)

Add parameters in the Params tab:

Key: id   Value: 123

Sending a POST Body

Change method to POST, go to Body tab, select raw + JSON, and enter:

{"name": "Acme Corp", "email": "contact@acme.com"}

Method 2: Calling a RESTlet with Python

Use the requests-oauthlib library for OAuth 1.0a signing.

Install the Library

pip install requests requests-oauthlib

Python GET Request

from requests_oauthlib import OAuth1Session

ACCOUNT_ID = 'your_account_id'
CONSUMER_KEY = 'your_consumer_key'
CONSUMER_SECRET = 'your_consumer_secret'
TOKEN_KEY = 'your_token_key'
TOKEN_SECRET = 'your_token_secret'

RESTLET_URL = f'https://{ACCOUNT_ID}.restlets.api.netsuite.com/app/site/hosting/restlet.nl'

oauth = OAuth1Session(
    CONSUMER_KEY,
    client_secret=CONSUMER_SECRET,
    resource_owner_key=TOKEN_KEY,
    resource_owner_secret=TOKEN_SECRET,
    signature_method='HMAC-SHA256'
)

params = {'script': '123', 'deploy': '1', 'id': '456'}
response = oauth.get(RESTLET_URL, params=params)
print(response.json())

Python POST Request

import json

payload = {'name': 'Acme Corp', 'email': 'contact@acme.com'}
params = {'script': '123', 'deploy': '1'}
response = oauth.post(
    RESTLET_URL,
    params=params,
    data=json.dumps(payload),
    headers={'Content-Type': 'application/json'}
)
print(response.json())

Method 3: Calling a RESTlet with Node.js

Use the oauth-1.0a and axios libraries.

Install Dependencies

npm install axios oauth-1.0a crypto-js

Node.js GET Request

const axios = require('axios');
const OAuth = require('oauth-1.0a');
const CryptoJS = require('crypto-js');

const oauth = OAuth({
  consumer: {
    key: 'your_consumer_key',
    secret: 'your_consumer_secret'
  },
  signature_method: 'HMAC-SHA256',
  hash_function(base_string, key) {
    return CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA256(base_string, key));
  }
});

const token = {
  key: 'your_token_key',
  secret: 'your_token_secret'
};

const accountId = 'your_account_id';
const url = `https://${accountId}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=123&deploy=1&id=456`;

const authHeader = oauth.toHeader(oauth.authorize({ url, method: 'GET' }, token));

axios.get(url, { headers: { ...authHeader, 'Content-Type': 'application/json' } })
  .then(res => console.log(res.data))
  .catch(err => console.error(err));

Common Errors and Fixes

  • 401 Unauthorized β€” Check your TBA credentials and OAuth signature method (must be HMAC-SHA256).
  • 403 Forbidden β€” The role assigned to the token may not have RESTlet access. Check permissions.
  • 404 Not Found β€” Verify the script ID and deploy ID in your URL parameters.
  • SSS_REQUEST_LIMIT_EXCEEDED β€” You’ve hit the request limit; add retry logic with exponential backoff.

Next Steps

Now that you can call RESTlets externally, explore the native NetSuite REST Record API for standard CRUD operations without custom scripts: NetSuite REST Record API: CRUD Operations with Real Examples.

Share
  • Facebook

Sidebar

Ask A Question

Stats

  • Questions 6
  • Answers 6
  • Best Answers 0
  • Users 5
  • Popular
  • Answers
  • Rocky

    Issue in running a client script in NetSuite SuiteScript 2.0 ...

    • 1 Answer
  • admin

    How can I send an email with an attachment in ...

    • 1 Answer
  • admin

    How do I avoid SSS_USAGE_LIMIT_EXCEEDED in a Map/Reduce script?

    • 1 Answer
  • admin
    admin added an answer The issue is usually caused by following Wrong script file… September 14, 2025 at 10:33 pm
  • admin
    admin added an answer Steps to send an Invoice PDF by email: define(['N/email', 'N/render',… August 28, 2025 at 3:05 am
  • admin
    admin added an answer This error means your script hit NetSuite’s governance usage limit… August 28, 2025 at 3:02 am

Top Members

Rocky

Rocky

  • 1 Question
  • 22 Points
Begginer
Sophie1022

Sophie1022

  • 0 Questions
  • 20 Points
Begginer
jmargoli

jmargoli

  • 0 Questions
  • 20 Points
Begginer

Trending Tags

clientscript netsuite scripting suitescript
  • NetSuite Certifications in 2026: Complete Guide for Admins and DevelopersMay 13, 2026
  • N/runtime Module in NetSuite: Complete Guide to Script Context, User Info & Environment in SuiteScriptMay 12, 2026
  • N/email Module in NetSuite: Complete Guide to Sending Emails in SuiteScriptMay 10, 2026
  • Using AI to Write and Debug SuiteScript: A Complete Practical GuideMay 9, 2026
  • Top AI Prompts for NetSuite: Real-World Examples for Admins & DevelopersMay 8, 2026
  • Setting Up Claude AI with NetSuite Using MCP: A Step-by-Step Configuration GuideMay 7, 2026
  • How to Use Claude AI to Simplify Your NetSuite WorkflowMay 7, 2026
  • What No One Tells You About Being a NetSuite Consultant DeveloperMay 7, 2026
  • N/search Module in NetSuite: Complete Guide to Searching Records in SuiteScriptMay 7, 2026
  • N/record Module in NetSuite: Complete Guide to Creating, Loading, and Editing Records in SuiteScriptMay 6, 2026

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Menu

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us

Quick Links

  • NetSuite Scripting
  • NetSuite Customization
  • NetSuite Advanced PDF Template
  • NetSuite Integration
  • NetSuite Reporting & Analytics

Subscribe for NetSuite Insights....

© 2025 The NetSuite Pro. All Rights Reserved