This error means that you did not use Composer to install the client. Without Composer, in a script you have to
set_include_path(get_include_path() . PATH_SEPARATOR . dirname($_SERVER['SCRIPT_FILENAME']) . 'vendor/google-api-php-client/src'); require_once '/path/to/autoload.php'; require_once '/path/to/Client.php';
Without autoload.php, the class will not be found. In Client.php, the code prior to class definition tries to load autoload.php. But you already found Client.php, providing the full path to it. Thus, autoload.php does not load.
As you say, your problem was solved when reinstalling the API. I suppose you used the composer a second time.
Explanation: The above note does NOT mean skipping the proper client installation, according to Google documentation . Applies to "google / apiclient": "1.0.*@beta"
source share