This file is used to make requests through Ajax after I already connected to and received authorization from QuickBooks Online. Get Started API Explorer SDKs Sandbox Postman OAuth Workflows. $result = $OAuth2LoginHelper->getUserInfo() Īgain, getting the CompanyInfo works without any problems.ĭoes anyone have any idea what's going on?īelow I'm including the code from apiCall.php (from the HelloWorld example package, further edited by myself). $OAuth2LoginHelper = $dataService->getOAuth2LoginHelper() Here's how I try to get the UserInfo: $dataService->updateOAuth2Token($accessToken) PHP client for connecting to the QuickBooks Online V3 REST API. Thrown in /compiled/src/Core/OAuth/OAuth2/OAuth2LoginHelper.php on line 129 ![]() ![]() Here's the error that I receive: Fatal error: Uncaught QuickBooksOnline\API\Exception\SdkException: : Can't get OAuth 2 Access Token Object. But for some reason, it complains when I try to get the UserInfo data, or use any of the other API calls. The recommended way to install the QuickBooks PHP SDK is with Composer. While connecting to QuickBooks and getting authorization, everything seems to work accurately - and the access token object is successfully placed in the PHP Session. This step can be skipped for running the Hello, World Sample app. However, every few days well run into the invalidgrant issue. This in theory would always work because the refresh token is always the newest one used. QuickBooks integration support for PHP 5.x+. However, while I can successfully make a getCompanyInfo call and receive the results, I can't make a getUserInfo call (or most of the other API calls for that matter), as it will complain about the "access token object" not being set yet. We take the value of the token variable and replace it with the previous value. I can successfully get authorization using OAuth 2.0 and connect my client PHP web application to QuickBooks Online. But Ive tried a bit by setting via some curl options like below to upload files. I'm trying to use it to sync invoice data. Im using Quickbooks Integration Lib, it fulfills all of my requirement but there are no examples for this library to upload attachments to QuickBooks, somebody has already raise an issue but no solution for this bug. The QuickBooks-V3-PHP-SDK is giving me a hard time. Connecting from QuickBooks desktop from php via web connector is hard if you dont know how web connector work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |