logo

QuickBooks Oauth 2.0 Plugin

Introduction

This Quickbooks plugin version makes it possible for a user to use 1 company account and stay authenticated for 100days at a time.

Prerequisites

You will need a developer account with Quickbooks in order interact with the Plugin: https://developer.intuit.com/app/developer/qbo/docs/get-started​

How to setup

  • Once you are logged in, click 'Dashboard'.
Image without caption
  • In Dashboard you will find all your apps
Image without caption
  • Click on 'Create an app' to create an application.
  • Select the platform you want to develop for (by default will be only one type "Quickbooks online and payments")
  • Insert a new app name and select scopes from the dropdown for it. (Depending on your requirements the scopes can vary)
Image without caption
  • Provide a name to your app and click "Create app"
Navigate to the 'Keys' tab, in BOTH 'Redirect URI' sections add your app's redirect URL.
Your Redirect URL in most cases will be, https://_your-app_.bubbleapps.io/api/1.1/oauth_redirect
  • Navigate to the 'Dashboard' tab, find Resources section, and click on OAuth Playground, see in the image below.
Image without caption
  • Select your app form the list.
Image without caption
  • Select all scopes that you need, then click on the "Get authorization code" button.
Image without caption
  • Next will be opened a new page where you will be asked to Authorize Intuit to securely share your data, click Connect.
Image without caption
  • You will be redirected back, after that click the "Get tokens" button.
Image without caption
  • On the right side will be shown results, select all "Authorziation" keys from there, together with "Basic" word, see in the example below.
Image without caption
❕
Authorization key example: Basic UTBIenl2UVNrSDdrdzhINnFrbU9sMHVtWEhvS09hYjRmd2Njc21scEF1VHluLEVjOHE6dFhwLlZOazdpUWx4oAjRsTuIyNfCMHd1V25Fd1BublJJZ2l0ZXFkQw==
  • Place your Authorization key into the plugin's settings in your app in first field.
Image without caption
  • On the same page open section 4, "Refresh access token", and copy the refresh token.
Image without caption
  • In your Bubble app, go to Data and create new type, call it how you want, (ex: Quickooks Tokens) and added new entry called Old refresh token, where you paste your Refresh Token.
This is how it looks like:
Image without caption
We have to do it just once.
  • Now create an event in workflow, for example when page is loaded, to GET NEW ACCESS TOKEN, and save results in a custom state, then save REFRESH TOKEN in your data.
Example:
Image without caption
Image without caption
Now you don't have to worry about your refresh token, it will be renewed automatically.

Data Calls

Image without caption

Action Calls

Image without caption

Workflow example

Let's take Company Details:
  1. Insert company id which is "Realm ID" , you can get on the same page where you got refresh token, find it on section 2, see example below:
Image without caption
2. Next we need to get access token, for that, in Authorization field select from API provider, "GET NEW ACCESS TOKEN" and select access_token after.You will notice the word "Bearer" there, leave it there and insert access token after it !
Example:
Image without caption

Changelogs

Update 01.11.21 - Version 1.10.0
  • Minor fixes
Update 19.04.22 - Version: 1.11.0
  • Minor updates
Update 12.10.22 - Version: 1.11.0
  • Added "Updat-e Invoice" and "Send Invoice" actions

Demo to preview the settings