Configuring connection for Oracle NetSuite REST connector

Configuring connection for Oracle NetSuite REST connector

Step 1: Enabling an Application in NetSuite to Use OAuth 2.0

1.1 Login in your NetSuite account.

Go to Setup > Integration > Manage Integrations > New

1.2 Configure the app as shown below.

Name

Enable Token Based Authentication

Enable Authentication code grant and provide redirect URI.

In Scope, Enable REST Web services.

And Save.

Make a note of Client ID and Client Secret.

Step 2: POST Request to the Token Endpoint

2.1 Generate Code Challenge using a Code Verifier

To Apply SHA256 on the code_verifier you can use the online pkce generator Online PKCE Generator Tool

Note

Apply SHA256 on the code_verifier parameter.

The length of the code_verifier parameter must be between 43 and 128 characters.

Valid characters for the code_verifier parameter are alphabet characters, numbers, and non-alpha numeric ASCII characters: hyphen, period, underscore, and tilde (- . _ ~).

Please make a note of code challenge and code verifier.

2.2 Generate Authorization code.

Using the browser run below GET request.

https://.app.netsuite.com/app/login/oauth2/authorize.nl?scope= rest_webservices&redirect_uri=<Enter_your_redirect_URL_used_in step1.2>&response_type=code&client_id=<ClientID_from_step1.2>&state=ykv2XLx1BpT5Q0F3MRPHb94j&code_challenge=<code_Challenge_generated_at_Step2.1>&code_challenge_method=S256

Note :

The length of the state parameter must be between 24 and 1024 characters. Valid characters are all printable ASCII characters.

Once you hit the request. Post login you will see the below screen click on continue.

You will be redirected to a new page. In the redirected URL you will find the authorization code.

Make a note of Authorization Code.

2.3 Generate Access and Refresh Token.

Using Postman, run a POST request as shown below.

Method : POST

Endpoint : https://.suitetalk.API.netsuite.com/services/rest/auth/oauth2/v1/token

Authorization : Basic

UserName : Client_ID from step 1.2

Password : Client_Secret from step 1.2

6

In the Body section, choose x-www-form-urlencoded and provide details as shown below.

code : Authorization code from step 2.2

redirect_uri : Redirect URL from step 1.2

grant_type : authorization_code

code_verifier : Code Verifier from Step 2.1

Once you click send. You will receive Access Token and Refresh Token in the response.

Make a note of Access Token and Refresh Token.

Step 3: Create a connection for Oracle NetSuite REST connector

Provide the below details in the connection.

Client ID - Client_ID from step 1.2

Client Secret - Client_Secret from step 1.2

Access Token - Access Token from step 2.3

Refresh Token - Refresh Token from step 2.3

Refresh Url - https://accountID.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token

Grant Type - refresh_token

Instance Url - https://accountID.suitetalk.api.netsuite.com

Server Url - https://accountID.suitetalk.api.netsuite.com

Note - Update acountID with your NetSuite accountID

Other Recommended configurations

Minimum Pool Size - 10

Maximum Pool Size - 100

Pool Increment Size - 10

Block Timeout - 10000

Expire Timeout - 10000

Response TimeOut - 900000

Keep Alive Interval - 900000

1 Like