QuickBooks/IPP/IntuitAnywhere.php
public function reconnect($app_username, $app_tenant)
	{
		if ($arr = $this->_driver->oauthLoad($this->_key, $app_username, $app_tenant) and 
			strlen($arr['oauth_access_token']) > 0 and 
			strlen($arr['oauth_access_token_secret']) > 0)
		{
			$arr['oauth_consumer_key'] = $this->_consumer_key;
			$arr['oauth_consumer_secret'] = $this->_consumer_secret;
			
			$retr = $this->_request(QuickBooks_IPP_OAuth::METHOD_GET, 
				QuickBooks_IPP_IntuitAnywhere::URL_CONNECT_RECONNECT, 
				array(), 
				$arr['oauth_access_token'], 
				$arr['oauth_access_token_secret']);
			
			// Extract the error code
			$code = (int) QuickBooks_XML::extractTagContents('ErrorCode', $retr);
			$message = QuickBooks_XML::extractTagContents('ErrorMessage', $retr);

			if ($message)
			{
				$this->_setError($code, $message);
				return false;
			}
			else
			{
				// Success! Update the tokens 
				$token = QuickBooks_XML::extractTagContents('OAuthToken', $retr);
				$secret = QuickBooks_XML::extractTagContents('OAuthTokenSecret', $retr);

				$this->_driver->oauthAccessWrite(
					$this->_key, 
					$arr['oauth_request_token'], 
					$token, 
					$secret,
					null, 
					null);

				return true;
			}
		}
	}
public function reconnect($app_username, $app_tenant)
	{
		if ($arr = $this->_driver->oauthLoad($this->_key, $app_username, $app_tenant) and 
			strlen($arr['oauth_access_token']) > 0 and 
			strlen($arr['oauth_access_token_secret']) > 0)
		{
			$arr['oauth_consumer_key'] = $this->_consumer_key;
			$arr['oauth_consumer_secret'] = $this->_consumer_secret;
			
			$retr = $this->_request(QuickBooks_IPP_OAuth::METHOD_GET, 
				QuickBooks_IPP_IntuitAnywhere::URL_CONNECT_RECONNECT, 
				array(), 
				$arr['oauth_access_token'], 
				$arr['oauth_access_token_secret']);
			
			// Extract the error code
			$code = (int) QuickBooks_XML::extractTagContents('ErrorCode', $retr);
			$message = QuickBooks_XML::extractTagContents('ErrorMessage', $retr);

			if ($message)
			{
				$this->_setError($code, $message);
				return false;
			}
			else
			{
				// Success! Update the tokens 
				$token = QuickBooks_XML::extractTagContents('OAuthToken', $retr);
				$secret = QuickBooks_XML::extractTagContents('OAuthTokenSecret', $retr);

				$this->_driver->oauthAccessWrite(
					$this->_key, 
					$arr['oauth_request_token'], 
					$token, 
					$secret,
					null, 
					null);

				return true;
			}
		}
	}
Reconnect/refresh the OAuth tokens

For this to succeed, the token expiration must be within 30 days of the
date that this method is called (6 months after original token was
created). This is an Intuit-imposed security restriction. Calls outside
of that date range will fail with an error.

@param string $app_username
@param string $app_tenant