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. [API Development](/categories/api)
4. /
5. ttskch/google-sheets-api-php-client

ActiveLibrary[API Development](/categories/api)

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

PHP client library for Google Sheets API.

82.5k↑53.8%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 3w ago

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 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

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://avatars.githubusercontent.com/u/4360663?v=4)[Takashi Kanemoto](/maintainers/ttskch)[@ttskch](https://github.com/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)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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