you don’t need to manually add the vendor/autoload.php. This already happens in your webroot/index.php .
Make sure to either use a FQCN like $client = new \Google\Client(); or add a use statement at the top of your class like
class MyController extends Controller
public function myGoogleAction()
$client = new Client();
This is all very standard PHP namespace stuff, nothing whatsoever to do with CakePHP, in case you’re wondering why the Cake documentation doesn’t discuss it, or want to know how to Google up additional reading materials.