Install The Google Client Library Specifying Google Sheets

| July 7, 2022 | 842 views | Google Sheets API PHP Client

We will only be needing the Online Spreadsheet Editor of Google, otherwise known as Google Sheets, for the examples we will be making. Thus, we will not be including the other Google API services, which is about 200+ all in all. And we will be using composer to install the Google Client Library.

Overview of all the google api services.

In order to exclude dependencies we are not using on the example test web application we are developing for this tutorial, we will specify that we only need “Google Sheets” or simply “Sheets“, and run the task Google\Task\Composer::cleanup. All these configurations, we will be setting them up on the composer.json file.


Step 1.

Copy the following into your composer.json file.

    "require": {
        "google/apiclient": "^2.12.1"
    "scripts": {
        "pre-autoload-dump": "Google\\Task\\Composer::cleanup"
    "extra": {
        "google/apiclient-services": [

Step 2.

Execute the following command to install the Google Client Library, particularly for Google Sheets.

$ composer install


Google Client Library Specifying Google Sheets is now installed.

Look, we only have Google Sheets API Client Library.



Leave a Reply

Your email address will not be published.