Articles on: Apps

How to Enable NetSuite Token-Based Authentication

Plans: Enterprise Platforms: All platforms


AfterShip Returns supports NetSuite TBA (Token Based Authentication) as an authentication type to prevent unauthorized access.


You can easily use TBA, once you make some required changes with respect to your NetSuite settings. Carefully follow the 5 steps given below to be able to establish a connection with AfterShip Returns:


Step 1: Get the account ID


  1. Access your Oracle NetSuite account > Go to the Setup tab > Company > Company Information
  2. Your account number will be listed under the Account ID field
  3. Copy it for later use


Step 2: Enable Token Based Authentication (TBA)


  1. Again, go to the Setup tab of your Oracle NetSuite account > Company > Enable Features > SuiteCloud > Manage Authentication
  2. In the SuiteScript section, check Client SuiteScript and Server SuiteScript
  3. In the SuiteTalk (Web Services), check REST Web Services
  4. In the Manage Authentication section, check Token-Based Authentication
  5. Scroll to the bottom of the page and click Save


Step 3: Create an Integration Record


  1. Once the TBA is enabled, go back to the Setup tab > click on **“Integrations” > Manage Integrations > New **
  2. Set the name to "AfterShip Integration" and perform these actions


  • Check the "Token-Based Authentication" option
  • Uncheck the "TBA: AUTHORIZATION FLOW" and "AUTHORIZATION CODE GRANT" options
  • Check the "TBA: ISSUETOKEN ENDPOINT" option



In case you already have an integration record for AfterShip, you can reuse it by simply modifying settings as mentioned above.


  1. Copy the values mentioned for “Consumer Key/Client Key” and “Consumer Secret/Client Secret”


Note: You can reuse the values for multiple access tokens.


Make sure that you copy the values properly, as they will be shown only once.


Step 4: Create a role and assign users


  1. Go to Setup > Users/Roles > Manage Roles > New
  2. Create a role and allow necessary permissions for successful AfterShip integration.


Before set all permissions you will need to set the Subsidiary Restrictions to All

NetSuite Subsidiary Restrictions


Here’s what you need to take care of:


  • Lists - Customers
  • Lists - Contacts
  • Lists - Currency
  • Lists - Items
  • Lists - Perform Search
  • Lists - Persist Search
  • Lists - Accounts
  • Lists - Address List in Search
  • Lists - Custom Record Entries
  • Lists - Locations Full
  • Lists - Resource Full
  • Lists - Resource Allocation Approval
  • Lists - Resource Allocations
  • Lists - Resource Groups
  • Reports - SuiteAnalytics Workbook
  • Transactions - Find Transactions
  • Transactions - Sales Order
  • Transactions - Item Fulfillment Full
  • Transactions - Fulfill Sales Orders Full
  • Transactions - Return Authorization (for RMA creation feature) Full
  • Transactions - Return Auth.Approval Full
  • Transactions - Credit Memo Full
  • Transactions - Credit Returns Full
  • Transactions - Item Receipt Full
  • Transactions - Receive Order Full
  • Transactions - Refund Returns Full
  • Transactions - Sales Order Approval Full
  • Setup - SOAP Web Services
  • Setup - Rest Web Services
  • Setup - User Access Token (for Token-Based Authentication)
  • Setup - Custom Transaction Fields
  • Setup - Log in using Access Tokens


Make sure each created role has the "User Access Tokens" permission, as it’s important for using the TBA.


  1. Now, assign the created role to concerned individuals. Go to Lists > Employees > Employees > Edit user > Access > Roles


Step 5: Create an Access Token for the Integration record, User, and Role


  1. Go to Setup > Users/Roles > Access Tokens > New
  2. Select the Integration record, User, and Role that you’ve created by following the aforementioned steps
  3. Token Id and Token Secret will be displayed after tapping the Save button. Copy the values for AfterShip Returns integration


Establish a connection with AfterShip Returns


Visit the AfterShip Returns and NetSuite integration page and paste all the copied values to establish a successful connection with AfterShip Returns.



The same Consumer Key, Consumer Secret, Token ID, and Token Secret can be used multiple times while creating more connections.


For any further questions or help, please contact our chat support team or reach out to us at support+returns@aftership.com.

Updated on: 15/04/2025