To use the QuickBooks API in Google Sheets, you have to create a dedicated app in your account. To get started, you will create a sandbox app that allows you to develop using their API, before you publish a production version.
Note: QuickBooks' Oauth2.0 access token expires after 60 minutes. Read this documentation for more information:
Step 1: Create a Sandbox QuickBooks App
First, log in to your QuickBooks Developer Account, using your account credentials. If you don’t yet have an account yet, click here to sign up for a Quickbooks developer account.
Go to My Hub → Sandboxes
You’ll be redirected to this page, where click on “Add”
Select these options accordingly, and choose country from the dropdown and click on “Create”
Now, a sandbox app is created. In order to access most QuickBooks API endpoints, you will need an access token. To obtain an access token, follow the next steps.
Step 2: Get an OAuth 2.0 Access Token
First, go to https://developer.intuit.com/app/developer/playground and get an authorization code for your app.
Select workspace and the sandbox app you created.
In the OAuth settings section, choose the required scopes and then click the Get authorization code button.
Select the sandbox app from the dropdown, and click next
You will be asked to connect your app to a Sandbox. Click the Connect button to continue.
Next, you have to get an access token from the authorization code you previously obtained. Click the Get tokens button to retrieve the access token.
The access token will be shown in the Response section, on the right side of the screen. (valid uptill 1hr)
Scroll down, to find the refresh token generated (valid uptill 30days)
Step 3: Sheetgo API Connector Configuration
As an example, we’ll use the company info endpoint. This endpoint requires an additional parameter, RealmId, a unique identifier for your company. You can find the company info value in the Developer Playground page where you obtained your access token.
A correctly formatted URL for this example endpoint, with the required parameters, would look like this:
https://sandbox-quickbooks.api.intuit.com/v3/company/<RealmId>/companyinfo/<Rea lmId>
Then, in the Headers section, you should add two rows with the following keys and values:
{
"Authorization": "Bearer ACCESS_TOKEN",
"Accept": "application/json"
}