OAuth2 for RESTlet or Suitetalk

I’m working on a NetSuite integration and initially struggled with OAuth 1.0, so I switched to OAuth 2.0. I successfully obtained an access token using the authorization code flow, but when I try to use it in a GET request to my RESTlet’s external URL (just to return a simple test response), I keep getting a 500 Internal Server Error. I also tried using the same access token to connect to the SuiteTalk API, but that returned a 401 Unauthorized error, even though I’m using the token correctly. My script is a basic SuiteScript 2.1 RESTlet that returns a simple message.

I’m using an administrator-level custom role with the following permissions all set to Full:

  • Access Token Management

  • Integration Application

  • Log in using Access Tokens

  • Log in using OAuth 2.0 Access Tokens

  • REST Web Services

  • Set Up SOAP Web Services

  • SuiteScript

“Web Services Only Role” is not enabled.

Any advice on what I might be missing to get OAuth 2.0 working with RESTlets or SuiteTalk would be greatly appreciated. Thank you in advance.

Rookie Asked on May 16, 2025 in How To's.
Add Comment
1 Answer(s)

OAuth2 for NetSuite RESTlets or SuiteTalk isn’t supported natively. You’ll need to set up OAuth 1.0 Token-Based Authentication or use external middleware to manage OAuth2 flows and token exchange.

Rookie Answered on July 23, 2025.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   SuiteMigration   Become a Sponsor