Overview
Token-Based Authentication (TBA) is a robust method for authorizing external systems to interact securely with NetSuite, particularly through its RESTlet endpoints. It utilizes OAuth 1.0, a well-established protocol for secure API authentication, offering simplicity and reliability for integrating applications.
In this guide, we’ll walk you through the setup process using Postman, a powerful tool for testing and developing APIs. Whether you’re a developer new to NetSuite integrations or looking for a streamlined authentication solution, this article will equip you with the knowledge and steps needed to configure TBA effectively.
By following these steps, you’ll learn:
- How to generate and manage OAuth 1.0 tokens for NetSuite.
- Setting up Postman to handle OAuth 1.0 authentication seamlessly.
- Testing your NetSuite RESTlet endpoints using Postman, ensuring secure and authenticated API calls.
By the end of this guide, you’ll be equipped to leverage Token-Based Authentication for seamless integration between external applications and NetSuite, enhancing your workflow efficiency.
Steps
1. Ensure TBA related functions are enabledBefore setting up TBA, ensure that Token-Based Authentication functions are enabled in your NetSuite account settings.
This setting can be enabled by Setup -> Company -> Enable Features.
In the “Suite Cloud” subtab, you will find out the setting “TOKEN-BASED AUTHENTICATION”.
2. Setup Integration in NetSuite
a. Navigate to Setup -> Integration -> Manage Integrations -> New.
b. Ensure to check the necessary permissions and scope for the integration, focusing on the required permissions without unnecessary access.
c. Create a new integration record and save the credentials securely. These credentials will only appear once upon creation, and there is no way to check them again after this step.
3. Generate Access Token
- Go to Home -> Sidebar -> Manage Access Tokens -> New.
- Select the integration app created in step 2.
- Generate and save the access token securely after creation.
4. Get Your RESTlet Endpoint URL
a. We will deploy a restlest on NetSuite to let Postman call in next step
b. Create a basic Restlet, and on the Restlet you will see the URL to be called.
Example URL format: https://<account_id>.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=<script_id>&deploy=<deployment_id>.
c. Copy this URL as it will be used in Postman for API calls.Paste the URL to postman, depends on your design to use get / post Needed fields to be filled in the authorization
5. Configure Postman for API Testing
a. Open Postman and paste the RESTlet endpoint URL.
b. Select the HTTP method (GET/POST) based on your API design.
c. Configure the necessary headers and parameters for authentication:
1). Use OAuth 1.0 authorization in Postman.
2). Fill in the required OAuth 1.0 credentials (Consumer Key, Consumer Secret, Access Token, Access Token Secret).
3). Ensure all fields required by your RESTlet endpoint are correctly filled to execute API requests.
4). NetSuite Realm will be one of the Authorization field, fill in the account number.
5). For type, authorization tab, remember to change “Add authorization data to” to “Request Headers”.
By following these detailed steps, you will successfully set up Token-Based Authentication (TBA) for NetSuite RESTlet endpoints and know how to use Postman to call it.
About Us
Concentrus is a leading provider of innovative cloud-based enterprise resource planning (ERP) solutions, including NetSuite. Our team of NetSuite experts offers a range of services, including NetSuite price analysis, NetSuite training, and NetSuite integration services.
Our goal is to help businesses of all sizes maximize their investment in NetSuite by providing expert NetSuite cost optimization and implementation strategies. With years of experience as a NetSuite partner, our NetSuite administrators and NetSuite consultants are well equipped to help businesses of all sizes with their NetSuite consulting needs.
Whether you're looking for a NetSuite consultant to help with your NetSuite implementation or you need ongoing NetSuite support, Concentrus is here to help.
Read About Our Implementation Methodology
Want more NetSuite Tips and Tricks? Check out our Short & 'Suite videos