Connecting

Getting Started

Because QuickBooks Online is a cloud application, you don't need to give your user the Autofy Agent in order to connect. Instead, follow this guide to get your users on board. We'll discuss what to do in test, and in production. Follow all the test steps first before following the production steps.

Test Setup

Before you begin, you'll need to register your app with Intuit if you haven't already. Create a listing for your app with Intuit, then continue here.

1. Send your production Client ID and Client Secret to an Autofy developer.

🚧

Production ID and Secret

Autofy needs your production app's Client ID and Client Secret - developer apps aren't supported.

Please do not send Client ID and Client Secret for your customer's production account.

If you're having trouble figuring out what to send, please reach us using the messenger below, or email [email protected]

These are securely stored in our environment, and are used to enable the connection between Autofy and QuickBooks Online on behalf of your application. We'll give you an Autofy appID, which will identify your app in Autofy.

📘

QBO Sandbox

Autofy doesn't support QBO sandbox companies. In order to test, set up a production trial of QBO, or use a subscription you already have.

2. Review our example page.

Go to this example page. Here you'll see a few fields we need to capture in order to enable the connection to QBO. You'll set these programmatically when you establish the connection in production.

  • channel is a short code that identifies which application you're connecting to. In this case, it will be 'qbo'.
  • appID is the aforementioned ID that our development team issues to you, which identifies your application.
  • userID is created in a further step. Use this to get an endpointID, which identifies the QBO company you want to make requests against.

3. Create a User

Call https://api.getautofy.com/v2/manage/user from our Create A User guide to create a user. Store user.id from the response, this is your userID.

4. Connect to your test QBO from our example page

Fill in the values on the page and click Connect. This will connect Autofy to your QBO, and return endpointID in a response displayed on our example page. Autofy is now connected to your QBO, and you can now make calls against it.

Production Setup

In production, you'll need a page or component on your website that achieves what the Test setup above does.

1. Import the Autofy js component.

In your application, create a page that imports a JavaScript component we built: afconnect.js. Import it from this location: https://api.propelware.com/scripts/afconnect.js.

2. Create a div in your HTML that will contain the QB Connect button.

Set id="autofy_channel". afconnect.js will place the button there.

3. Create your user just as above, with Create A User.

4. Programatically fill in appID, userID, and channel.

On your page, set these values in an object that we recommend calling window.autofySettings. appID was given to you by Autofy. userID was returned from /manage/user/. Recall that channel will always be 'qbo'.

5. Receive the response from Autofy.

Once this is implemented, your end user will click Connect. When they do, afconnect.js will respond with an object via message event. You should implement an eventListener to receive the response.

Store endpointID for use in API requests for the QBO company.


Did this page help you?