Skip to content

QuickBooks OAuth “invalid_client” when exchanging an authorization code

Updated

Intuit returns invalid_client at the token endpoint after the QuickBooks consent screen. Check the client credentials and the Basic authorization header.

The browser can return a code successfully while the backend still gets invalid_client. Check the credentials used in the token request.

What we checkedWhere
Intuit token endpoint request and credentialsdeveloper.intuit.com
Report of invalid_client during code exchange from Access VBAstackoverflow.com

Check it yourself

  • Compare the client ID used to start consent with the ID the backend uses for the token exchange. Check that the secret comes from the same app and key set in the Intuit Developer Portal.
  • If you build the POST yourself, check that the Authorization header begins with Basic followed by the Base64 encoding of client_id:client_secret. Use a colon between the two values.
  • With the credentials corrected, start consent again and send the new code with grant_type=authorization_code in the form body.

Still failing?

Send the HTTP status, error body and whether you used Development or Production keys to money@iftodo.ai. Leave out the code, client secret and authorization header.

Weekly sync checks for €29 a month

For one Shopify or Square to QuickBooks workflow, we check weekly exports for missing or duplicate records and email you when we find a mismatch. We run a sample first to see whether the two exports have matching references.

Ask for a sample check. We agree how to share exports before starting billing. Cancel by email before your next renewal.