In order to authenticate to NetSuite, you need the following:
We will walk through how to get each value in the following sections.
REST Web Services feature
Enable the feature at Setup > Company > Setup Tasks > Enable Features, in the SuiteTalk (Web Services) section, on the SuiteCloud subtab. To use the feature, you must accept the SuiteCloud Terms of Service.
SuiteAnalytics Workbook feature
Enable the feature at Setup > Company > Setup Tasks > Enable Features, on the Analytics subtab.
You will require the following permissions:
- REST Web Services
- Log in using Access Tokens
- SuiteAnalytics Workbook
Your permissions vary based on which role you are assigned. You can edit roles in Setup > Users/Roles > User Management > Manage Roles. Ensure your user is assigned a role with the aforementioned permissions in order to complete the setup.
There are two different sets of permissions you will need:
- The permissions mentioned above are to set up your integration.
- Later when creating a token, you will need to assign a user with a role that has the necessary permissions to access records (e.g. payments, invoices, bills, etc.)
These can be the same or different roles. They can be assigned to one or many users.
account_id can be found in the URL when you are logged into the NetSuite dashboard in your browser. It will look
something like the following:
The Account ID precedes
.app.netsuite.com, which in this case is
123456. Note that your ID may include
(representing “Sandbox 1”). Be sure to include the entire ID as it appears in the URL, including any letters, numbers,
At the last step of creating an Integration record, save the consumer key and consumer secret. They will not be shown again once you navigate away from the page.
You will use the integration record you created along with your user (or the user who has the necessary permissions to access records).
At the last step, save the token key and token secret.
Now with these values, you can successfully authenticate to NetSuite. Simply pass the values into the client:
1 2 3 4 5 6 7 client = LedgerSync::Ledgers::QuickBooksOnline::Client.new( account_id: account_id, consumer_key: consumer_key, consumer_secret: consumer_secret, token_id: token_id, token_secret: token_secret )