Skip to content

Instantly share code, notes, and snippets.

View sylphrena0's full-sized avatar

Sylphrena Kleinsasser sylphrena0

View GitHub Profile
@sylphrena0
sylphrena0 / gas_qbo_oauth2.js
Created January 7, 2022 19:11 — forked from goelp/gas_qbo_oauth2.js
Google Apps Script OAuth2 script for QuickBooks integration with Google Sheets
var CLIENT_ID = '...'; // Get from Quickbooks Developer Console
var CLIENT_SECRET = '...'; // Get from Quickbooks Developer Console
var BASE_AUTH_URL = 'https://appcenter.intuit.com/connect/oauth2';
var TOKEN_URL = 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer';
var API_SCOPE = 'com.intuit.quickbooks.accounting';
var REDIRECT_URI = '...'; // Generate using the logRedirectUri() function mentioned at the end of this script
var RESPONSE_TYPE = 'code';
/**
* Authorizes and makes a request to the Quickbooks API using OAuth 2.