Configuring connection for Oracle NetSuite REST connector
Tags: webmethods, oracle, rest, integration
Published: 2023-06-16 10:40:02

---
title: Configuring connection for Oracle NetSuite REST connector
published: true
date: 2023-05-04 05:05:27 UTC
tags: webMethods, oracle, rest, integration
canonical_url: https://tech.forums.softwareag.com/t/configuring-connection-for-oracle-netsuite-rest-connector/278219/1
---

 

## 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](https://global.discourse-cdn.com/techcommunity/optimized/3X/d/7/d7ce7d83ed3625086848bcf49b2124852b688b5f_2_690x368.png)](https://global.discourse-cdn.com/techcommunity/original/3X/d/7/d7ce7d83ed3625086848bcf49b2124852b688b5f.png "1")

**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**.

[![2](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/5/15699e2724f742b06c1972de009ca620130a1ae1_2_690x401.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/5/15699e2724f742b06c1972de009ca620130a1ae1.png "2")

Make a note of **Client ID** and **Client Secret**.

[![3](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/e/1e7f3f6e849f66807dd2e6981c1fcb66726054ae_2_633x500.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/e/1e7f3f6e849f66807dd2e6981c1fcb66726054ae.png "3")

### 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](https://tonyxu-io.github.io/pkce-generator/)

**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.

[![4](https://global.discourse-cdn.com/techcommunity/optimized/3X/6/a/6a5ac45f6c4316d89ac78ce7e5dd06c0b9b39c67_2_690x212.png)](https://global.discourse-cdn.com/techcommunity/original/3X/6/a/6a5ac45f6c4316d89ac78ce7e5dd06c0b9b39c67.png "4")

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

[![5](https://global.discourse-cdn.com/techcommunity/optimized/3X/3/e/3e01d952096655e3e5f559f92285037c30070660_2_690x18.png)](https://global.discourse-cdn.com/techcommunity/original/3X/3/e/3e01d952096655e3e5f559f92285037c30070660.png "5")

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](https://global.discourse-cdn.com/techcommunity/original/3X/9/b/9b49366200af9600811a7e963a61eb1ce87039c9.png)

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

[![7](https://global.discourse-cdn.com/techcommunity/optimized/3X/5/0/5081f1eca9e9dedb16a1db5947933325d92cc3f9_2_690x309.png)](https://global.discourse-cdn.com/techcommunity/original/3X/5/0/5081f1eca9e9dedb16a1db5947933325d92cc3f9.png "7")

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](https://accountID.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token)

**Grant Type** - refresh\_token

**Instance Url** - [https://accountID.suitetalk.api.netsuite.com](https://accountID.suitetalk.api.netsuite.com)

**Server Url** - [https://accountID.suitetalk.api.netsuite.com](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

[Read full topic](https://tech.forums.softwareag.com/t/configuring-connection-for-oracle-netsuite-rest-connector/278219/1)