Re-authenticate your integration
This guide outlines the process for establishing persistent authentication between your NetSuite account with Anrok using SuiteTax or Legacy Tax. To complete this guide, you must have the following permissions:
- Administrator role in your NetSuite account. If you have a NetSuite integration user, you can use that instead for all NetSuite-related actions.
- Any user role for your company's corresponding Anrok account.
An unauthenticated connection means Anrok is calculating tax and ingesting transactions from NetSuite, but your OAuth credentials have expired. To import new products or reprocess historical transactions, complete Steps 1-4 to re-authenticate.
Important
This guide is sufficient to establish a single entity connection to Anrok. If you have multiple Anrok accounts for more than one NetSuite subsidiary, then please contact us to review before re-authenticating your account.
Step 1
Generate an Anrok certificate
During this step, generate an Anrok certificate to use in NetSuite during Step 3.
Try generating an Anrok certificate in the demo above ☝️
- In the Anrok app
, go to Data sources. Take me there!
- Next to NetSuite, select Three Dots then Re-authenticate.
- Click Generate Certificate. The certificate file will download automatically and be saved locally on your machine.
Important
After generating the certificate, do not close this page. The certificate requires an ongoing connection to the Anrok server when completing the NetSuite OAuth integration.
Step 2
Create Integration Record for Application
Once you've generated an Anrok certificate, you will need to create an integration record for the application. This will allow Anrok to connect to the Customer Key/Client ID generated to complete the integration.
Try creating Integration Records for Applications in the demo above ☝️
- In the NetSuite app
, go to Setup > Integration > Manage integrations > New.
- Under Integration, complete the following information:
-
Name — enter
Anrok client credentials oauth application {MMM/YY}. For example, use the nameAnrok client credentials oauth application Jun/26for a record created in June 2026. - Under Token-based Authentication, deselect all checkboxes.
- Note: You may need to check the "Token-Based Authentication" box in order to uncheck the "TBA: Authorization Flow" box, and then you can uncheck both.
- Under Oauth 2.0, click the checkbox
next to Client Credential (Machine to Machine) Grant. Deselect any other checkboxes.
- Under Scope, click the checkboxes
next to Restlets, Rest Web Services, and SuiteAnalytics Connect.
-
Name — enter
- When you are finished, click Save.
- Under Client Credentials, record the Consumer Key/Client ID.
Important
After closing this page, you will not be able to view the active Customer Key/Client ID again. To access a new Customer Key/Client ID: Select the Integration Record > click Edit > Reset Credentials.
Step 3
Create a mapping for the M2M client credential
Next, you will need to create a mapping for the machine-to-machine client credential. This will ensure Anrok is able to receive important transaction and product updates from NetSuite.
Try creating a mapping for the machine-to-machine client credential in the demo above ☝️
- In the NetSuite app
, go to Setup > Integration > OAuth 2.0 Client Credentials (M2M) Setup.
- Click Create New, then complete the following:
- Entity — select the appropriate entity. Note: if you have an integration user, you can choose that entity here.
- Role — select an Administrator role.
-
Application — select the
Anrok client credentials oauth applicationwith the current MM/YY. In the example provided above, that isAnrok client credentials oauth application Jun/26. - Certificate — choose the certificate generated in Anrok.
- When you are finished, click Save.
- Record the Certificate ID in a secure location. You will enter this in Anrok in the next step.
Step 4
Connect to NetSuite
Once you've create a mapping for the machine-to-machine client credential, you can then input the information required in Anrok to connect to NetSuite.
Try connecting with NetSuite in the demo above ☝️
- In the open Anrok page
, enter the following:
- Consumer Key/Client ID: enter the Client ID created from Step 2.4.
- Certificate ID: paste the Certificate ID recorded in Step 3.4.
- When you are finished, click Connect. If the connection is successful, you will be redirected to your Anrok Data Sources tab. In any other case, contact us for additional assistance.
Your authentication is complete, and no further action is needed. You should no longer see an info icon next to your NetSuite integration in your Anrok account.
Proceed to the next section of this guide only if you also need to generate a new API key for your Anrok <> NetSuite connection.
Update API Key and Secret
This is most commonly required when you generate (or "refresh") your sandbox from a NetSuite production account that has an existing Anrok integration. The API key originally associated with your Anrok account will not be valid for your sandbox.
If you are receiving an "invalid API key" error from Anrok when invoicing in NetSuite, then update your Anrok API key in NetSuite to remediate.
Step 1
Generate an Anrok API key
Try generating an Anrok API key in the demo above ☝️
- In the Anrok app
, go to Data sources. Take me there!
- Under Integration sources, click the option menu button
next to NetSuite, then select Manage Anrok API key.
- Select Generate Anrok API key, then copy
the API key.
- When you are finished, click Done.
Step 2
Create an API secret in NetSuite
NetSuite requires an Anrok API secret to authenticate its communication with Anrok and send live transaction data. This prevents users outside of your NetSuite instance from adding unauthorized transactions to your Anrok account.
Try creating an Anrok API secret in the demo above ☝️
- In the NetSuite app
, go to Setup > Company > API Secrets.
- Click Create New, then under the Details tab, enter the following information:
-
Name — enter
Anrok API Token. -
ID — enter
_anrok_api_token.-
Note: this value must be exact in your NetSuite account. If you have a pre-existing
_anrok_api_token, you should delete the historical version, then create a new record.
-
Note: this value must be exact in your NetSuite account. If you have a pre-existing
- Password — paste your Anrok API key.
-
Name — enter
- Navigate to the Restrictions tab, then complete the following:
- Select the checkbox
next to Allow For All Scripts.
- Select the checkbox
next to Allow For All Domains.
- Select the checkbox
- When you are finished, click Save.