QuickBooks: Generate Access Token using refresh Token

Introduction

In this blog, we are going to see the way to generate Quick Books access token using refresh token.

To generate access token, we need to have the below Quick Books values:

  • Refresh Token – As per the Quick Book documentation this token expires after 101 days.
  • Access Token – This token expires after 60 minutes.

Now, to generate Refresh Token and Access Token first we need to follow manually steps as

  1. Register the App in QuickBooks
  2. Use OAuth2.0 playground to generate the tokens

For more details please check the below link:
https://developer.intuit.com/app/developer/qbo/docs/get-started

Example

After generating Refresh Token and Access Token, please refer below code snippet:


In above Code,

  • <<Refresh_Token>>: Replace this value with value obtain during manual steps.
  • <<QuickBook ClientId>>: Quick book client id value.
  • <<QuickBook ClientSecretKey>>: Quick book client secret value.