Connecting to NetSuite Using Token-Based Authentication
To connect to NetSuite using token-based authentication (TBA), you need to specify your account ID, consumer key, consumer secret, token, and token secret. Perform the following actions to enable TBA in NetSuite:
- Enable token-based authentication in NetSuite
-
Select Setup > Company > Enable Features.
-
On the Enable Features screen, select SuiteCloud.
-
In the Manage Authentication section, enable the Token-Based Authentication and OAUTH 2.0 checkboxes.
-
Create a role with the necessary privileges for token-based authentication and access to the necessary objects, and assign it to the user that will be used for authentication.
-
Select Setup > User/Roles > Manage Roles > New.
-
Create a role and assign necessary permissions for the integration with the ODBC driver. At least the Web Services and User Access Tokens privileges are required.
-
Select Lists > Employees > Edit User > Access Roles > Roles, and assign the role to the necessary user.
-
Create an integration record with token-based authentication enabled.
-
Select Setup > Integrations > Manage Integrations > New.
-
In the Integration window that opens, enter a Name for the application and make sure the Token-Based Authentication checkbox is selected whereas TBA: Authorization Flow is not selected. Click Save.
-
On the confirmation screen, copy the generated Consumer Key and Consumer Secret. Save these values somewhere because you will not be able to retrieve them once you leave this screen; otherwise, you will have to re-generate them, which makes the old ones to stop working.
-
Create an access token.
-
Select Setup > Users/Roles > Access Tokens > New.
-
Select the Integration record, User, and Role created in the previous steps.
-
On the confirmation screen, copy the generated Token ID and Token Secret. Save these values somewhere because you will not be able to retrieve them once you leave this screen; otherwise, you will have to re-generate them, which makes the old ones to stop working.
-
After completing the above steps, insert the obtained Consumer Key, Consumer Secret, Token ID, and Token into the appropriate fields in the DSN settings.