PHPackages                             ttskch/google-sheets-api-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ttskch/google-sheets-api-php-client

ActiveLibrary

ttskch/google-sheets-api-php-client
===================================

PHP client library for Google Sheets API.

72.4k—0%3PHP

Since Nov 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ttskch/google-sheets-api-php-client)[ Packagist](https://packagist.org/packages/ttskch/google-sheets-api-php-client)[ RSS](/packages/ttskch-google-sheets-api-php-client/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

google-sheets-api-php-client
============================

[](#google-sheets-api-php-client)

[![Latest Stable Version](https://camo.githubusercontent.com/ed550e1e0e2f2d0e01b438a39f53f9c20ea9a61712bca79babdf72d1ff31400f/68747470733a2f2f706f7365722e707567782e6f72672f7474736b63682f676f6f676c652d7368656574732d6170692d7068702d636c69656e742f762f737461626c65)](https://packagist.org/packages/ttskch/google-sheets-api-php-client)[![Total Downloads](https://camo.githubusercontent.com/5a2c0b59d0f15be0d4adadbf0900192b30697e1403c04deaefe0f4aaa9444d3a/68747470733a2f2f706f7365722e707567782e6f72672f7474736b63682f676f6f676c652d7368656574732d6170692d7068702d636c69656e742f646f776e6c6f616473)](https://packagist.org/packages/ttskch/google-sheets-api-php-client)

PHP client library for Google Sheets API.

Requirements
------------

[](#requirements)

- PHP 5.6+

Installations
-------------

[](#installations)

```
$ composer require ttskch/google-sheets-api-php-client:@dev
```

Usage
-----

[](#usage)

### Initializing API client

[](#initializing-api-client)

#### With OAuth2

[](#with-oauth2)

```
// create \Google_Client instance with your OAuth2 client ID.
$googleClient = \Ttskch\GoogleSheetsApi\Factory\GoogleClientFactory::createOAuthClient(
    'client_id',
    'client_secret',
    'redirect_uri',
    'javascript_origin'
);

// authenticate and be athorized.
$authenticator = new \Ttskch\GoogleSheetsApi\Authenticator($googleClient);
if (isset($_GET['code'])) {
    $authenticator->authenticate($_GET['code']);
} else {
    $authenticator->authorize();
}
```

#### With Service Account

[](#with-service-account)

```
// create \Google_Client instance with your Service Account credentials json file.
$googleClient = \Ttskch\GoogleSheetsApi\Factory\GoogleClientFactory::createServiceAccountClient('/path/to/service-account-credentials.json');
```

### Using API

[](#using-api)

```
// create API client with authorized \Google_Client.
$api = \Ttskch\GoogleSheetsApi\Factory\ApiClientFactory::create($googleClient);

$service = $api->getGoogleService();

// now you can call all apis via $service.
// see \Google_Service_Sheets class to learn more about details.
$service->spreadsheets->...;
$service->spreadsheets_sheets->...;
$service->spreadsheets_values->...;
```

See also [demo](demo).

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/169f04c4d89617edd84f1aa4fd7949e12fe93cba573430964916ff67e12afe4e?d=identicon)[ttskch](/maintainers/ttskch)

---

Top Contributors

[![ttskch](https://avatars.githubusercontent.com/u/4360663?v=4)](https://github.com/ttskch "ttskch (2 commits)")

---

Tags

api-clientgoogle-sheetsspreadsheets

### Embed Badge

![Health badge](/badges/ttskch-google-sheets-api-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/ttskch-google-sheets-api-php-client/health.svg)](https://phpackages.com/packages/ttskch-google-sheets-api-php-client)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
