Fix OAuth 2.0 errors and connection issues

Users connect to and authenticate your app using OAuth 2.0.

If you run into issues setting up OAuth 2.0, or if users see issues during the authorization flow. Here are common situations and how to fix them.

When users connect to my app, the “Company selector” doesn’t display their QuickBooks Online companies

Problem

After authentication during the authorization flow, the “Company selector” dropdown doesn’t show any of the user’s QuickBooks companies. This prevents users from selecting or connecting to your app.

Note: Users may not see the “Company selector” dropdown if they only have access to one QuickBooks Online company. Since they don’t have multiple companies, we won’t prompt them to select anything.

Solution

The issue may be with your app’s scopes. Scopes correspond our API frameworks (QuickBooks Online Accounting API and QuickBooks Payments API). When you enable a scope, users only see their QuickBooks Online companies associated with the specified scope.

For instance, if you enable the QuickBooks Online Accounting scope (com.intuit.quickbooks.accounting), users will see companies that utilize accounting features in the “Company selector” dropdown. On the other hand, if you enable the QuickBooks Payments scope (com.intuit.quickbooks.payment), they will only see ones that utilize payments features.

To check your app’s scope settings:

  1. Sign in to your developer account.
  2. Select My Hub > App dashboard from the upper-right corner of the toolbar.
  3. Select and open your app.
  4. Select Permissions.
  5. Select the QuickBooks Online Accounting API (com.intuit.quickbooks.accounting) or QuickBooks Payments API (com.intuit.quickbooks.payment) scope checkbox, or both.

If users still don’t see their companies in the “Company selector” dropdown, the issue may be on their end.

Ask them to sign in to QuickBooks Online and make sure their subscription hasn’t expired. Also, the user connecting to your app needs to be an admin user.

Token refresh error codes

You may see errors during refreshing the tokens for the endpoint https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer. Follow the error code to narrow down the specific issue.

HTTP status code Description
5xx (500, 502, 503) This means our API has a service outage or is under maintenance. Please check the status page. Retry refreshing the token.
400 This should return an error as invalid_grant. Please refer to this help article for more details.