IntuitDeveloper / HelloWorld-PHP

Starter app in PHP using OAuth2 that demonstrates how to make a QBO API Call
Apache License 2.0
33 stars 46 forks source link

PHP Fatal error #2

Open Vaatyk opened 5 years ago

Vaatyk commented 5 years ago

When I try to connect to quickbook using php server to make my accounting app using the accounting api I get :

fatal error: uncaught quickbooksonline\api\exception\sdkexception: [0]: the code is not set. can't exchange for oauth 2 access token. thrown in /applications/xampp/xamppfiles/htdocs/helloworld-php/vendor/quickbooks/v3-php-sdk/src/core/oauth/oauth2/oauth2loginhelper.php on line 218.

I entered my keys correctly and didn't touch anything else, I also installed the v3-php-sdk

ADTC commented 5 years ago

Do you see error=invalid_scope in the callback URL?

Edit config.php and remove com.intuit.quickbooks.payment from the scope. Save your changes (this removes the Payments API from the scope).

Refresh the page before clicking "Connect to QuickBooks" again.

Are you using a Production company and you require Payments API?

Make sure that Payments is turned on and properly configured for your company.