Create a NetSuite Integration Record for OAuth 2.0 Authorization Code Access

Create an integration record with the Authorization Code Grant and REST Web Services scope, enter its redirect URI, and read the one-time Client ID and Client Secret.

The quick answer

Go to Setup > Integration > Manage Integrations > New, enter a Name, keep Authorization Code Grant checked, enter the Redirect URI the developer gave you, check the REST Web Services scope and click Save. NetSuite then shows the Consumer Key / Client ID and Consumer Secret / Client Secret once, so copy them straight away.

The screenshots show sample data. The company, person, integration name, redirect address and credentials are fictional. The form, defaults and wording described here were observed in one account and release, so check them against your own.

Before you start

On Setup > Company > Enable Features, SuiteCloud subtab, turn on REST Web Services under SuiteTalk (Web Services) and OAuth 2.0 under Manage Authentication. You need the Administrator role or the Integration Application permission. Ask the developer for the redirect address the app will use. This guide does not cover the sign-in and approval screen, exchanging the authorization code for tokens, or calling the REST endpoints, which happen in the developer's app.

01. Open a new integration

Go to Setup > Integration > Manage Integrations > New. On the Authentication subtab, Token-based Authentication is cleared and Authorization Code Grant is already checked in the account reviewed.

A new integration starts with Authorization Code Grant checked.

02. Name the integration

Enter the Name Order Status Portal Integration and the Description Lets the customer order portal read order status. Leave State Enabled.

The name and description identify the integration in the list.

03. Set the redirect and scope

On the Authentication subtab keep Token-based Authentication cleared, because this app signs users in with OAuth 2.0, and keep Authorization Code Grant checked. Enter the Redirect URI https://orders.example.test/oauth/callback and check the REST Web Services scope. The redirect address has to match exactly what the app sends, and only the scope the app needs should be checked.

The redirect URI and the REST Web Services scope are set.

04. Save and read the credentials

Click Save. NetSuite shows Integration successfully Saved. Under Client Credentials it shows the Consumer Key / Client ID and the Consumer Secret / Client Secret, with a warning that this is the only time they are displayed. Give both to the developer through a secure channel, because they work like a user name and password for the integration.

The credentials are shown once, right after the first save.

Check the result

  1. The confirmation reads Integration successfully Saved.
  2. The record shows Authorization Code Grant, the redirect URI and the REST Web Services scope.
  3. The Client Credentials band shows a Client ID and Client Secret that you have copied to the developer.

Common questions

Where do I create an integration record in NetSuite?

Under Setup > Integration > Manage Integrations > New.

What should the Redirect URI be?

The address NetSuite sends the user back to, with the authorization code, after approval. It has to be one NetSuite accepts and the one the app uses, so follow the validation message in your account. Use https for production; some development setups allow a localhost address.

Which scope do I check for REST web services or SuiteQL?

Check REST Web Services. RESTlets, SuiteAnalytics Connect and NetSuite AI Connector Service are separate scope boxes in the account reviewed, so check only what the app needs.

I lost the Client Secret. What now?

The values are shown only right after the record is first saved. Edit the integration record and use Reset Credentials, then give the new Client ID and Client Secret to the developer. Tokens issued with the old values may stop working; if the app's tokens no longer work, authorize it again.

Should I check Token-based Authentication?

Not for an app that only uses OAuth 2.0. It is a separate method, and leaving it checked adds an option nobody needs.