>> /vendor/autoload.php'; use QuickBooksOnline\API\DataService\DataService; $config = [ 'auth_mode' => 'oauth2', 'scope' => 'com.intuit.quickbooks.accounting', 'baseUrl' => 'Development', 'ClientID' => ' <<< CLIENTID >>> ', 'ClientSecret' => ' <<< CLIENTSECRET >>> ', 'RedirectUri' => ' <<< REDIRECTURI >>> ', ]; $dataService = DataService::Configure($config); $dataService->disableLog(); if (!$_GET['callback']) { header('Location: ' . $dataService->getOAuth2LoginHelper()->getAuthorizationCodeURL()); exit; } else { $code = $_REQUEST['code']; $realmID = $_REQUEST['realmId']; $OAuth2LoginHelper = $dataService->getOAuth2LoginHelper(); $tokens = $OAuth2LoginHelper->exchangeAuthorizationCodeForToken($code, $realmID); $dataService->updateOAuth2Token($tokens); // ************************************************************ // if it is not here the REQUEST and RESPONSE logos are created // ************************************************************ $dataService->disableLog(); }