PHPackages                             scottybo/google-apiclient - 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. scottybo/google-apiclient

ActiveLibrary[API Development](/categories/api)

scottybo/google-apiclient
=========================

Google api php client wrapper with Cloud Platform and Laravel 7 support

5.0.0(5y ago)095MITPHPPHP &gt;=7.3

Since Jan 25Pushed 5y agoCompare

[ Source](https://github.com/scottybo/google-apiclient)[ Packagist](https://packagist.org/packages/scottybo/google-apiclient)[ Docs](https://github.com/pulkitjalan/google-apiclient)[ RSS](/packages/scottybo-google-apiclient/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (18)Used By (0)

Google Api Client Wrapper
=========================

[](#google-api-client-wrapper)

> Google api php client wrapper with Cloud Platform and Laravel 6 support

[![Build Status](https://camo.githubusercontent.com/f4bf4294c0e5ef01e90507fd92825b4f54aba534cdbc9b86ba34514c8a4a4f5b/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f73636f747479626f2f676f6f676c652d617069636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/scottybo/google-apiclient)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/255b10f3d5dcb7d690f1165e115ea421e86d68a463c65e2f31f71952afff433d/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73636f747479626f2f676f6f676c652d617069636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/scottybo/google-apiclient/)[![Coverage Status](https://camo.githubusercontent.com/ddead9ff3321653fd36239599684c322f5230b5dbffce0f37b0e2838bb4f2178/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73636f747479626f2f676f6f676c652d617069636c69656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/scottybo/google-apiclient/code-structure/master)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://www.opensource.org/licenses/MIT)[![Latest Version](https://camo.githubusercontent.com/9720910ad22453914b8b41a9696a038171944f64c6769c2102249c9b9eae727e/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73636f747479626f2f676f6f676c652d617069636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/scottybo/google-apiclient)[![Total Downloads](https://camo.githubusercontent.com/55bc7e3bd4980a5f00962142affbdefdd695507a8cf18dcdbfac7b915e0f9d3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73636f747479626f2f676f6f676c652d617069636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/scottybo/google-apiclient)

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

[](#requirements)

This package requires PHP &gt;=7.2

Installation
------------

[](#installation)

Install via composer - edit your `composer.json` to require the package.

```
"require": {
    "scottybo/google-apiclient": "4.*"
}
```

Then run `composer update` in your terminal to pull it in.

Or use `composer require scottybo/google-apiclient`

Laravel
-------

[](#laravel)

To use in laravel add the following to the `providers` array in your `config/app.php`

```
scottybo\Google\GoogleServiceProvider::class
```

Next add the following to the `aliases` array in your `config/app.php`

```
'Google' => scottybo\Google\Facades\Google::class
```

Finally run `php artisan vendor:publish --provider="scottybo\Google\GoogleServiceProvider" --tag="config"` to publish the config file.

#### Looking for a Laravel 5 compatible version?

[](#looking-for-a-laravel-5-compatible-version)

Checkout the [original package](https://github.com/pulkitjalan/google-apiclient)

Usage
-----

[](#usage)

The `Client` class takes an array as the first parameter, see example of config file below:

```
return [
    /*
    |----------------------------------------------------------------------------
    | Google application name
    |----------------------------------------------------------------------------
    */
    'application_name' => '',

    /*
    |----------------------------------------------------------------------------
    | Google OAuth 2.0 access
    |----------------------------------------------------------------------------
    |
    | Keys for OAuth 2.0 access, see the API console at
    | https://developers.google.com/console
    |
    */
    'client_id' => '',
    'client_secret' => '',
    'redirect_uri' => '',
    'scopes' => [],
    'access_type' => 'online',
    'approval_prompt' => 'auto',

    /*
    |----------------------------------------------------------------------------
    | Google developer key
    |----------------------------------------------------------------------------
    |
    | Simple API access key, also from the API console. Ensure you get
    | a Server key, and not a Browser key.
    |
    */
    'developer_key' => '',

    /*
    |----------------------------------------------------------------------------
    | Google service account
    |----------------------------------------------------------------------------
    |
    | Set the credentials JSON's location to use assert credentials, otherwise
    | app engine or compute engine will be used.
    |
    */
    'service' =>  [
        /*
        | Enable service account auth or not.
        */
        'enabled' => false,

        /*
        | Path to service account json file
        */
        'file' => '',
    ],
];
```

To use Google Cloud Platform services, enter the location to the service account JSON file **(not the JSON string itself)**. To use App Engine or Computer Engine, leave it blank.

From [Google's upgrading document](https://github.com/google/google-api-php-client/blob/master/UPGRADING.md):

> Note: P12s are deprecated in favor of service account JSON, which can be generated in the Credentials section of Google Developer Console.

Get `Google_Client`

```
$client = new scottybo\Google\Client($config);
$googleClient = $client->getClient();
```

Laravel Example:

```
$googleClient = Google::getClient();
```

Get a service

```
$client = new scottybo\Google\Client($config);

// returns instance of \Google_Service_Storage
$storage = $client->make('storage');

// list buckets example
$storage->buckets->listBuckets('project id');

// get object example
$storage->objects->get('bucket', 'object');
```

Laravel Example:

```
// returns instance of \Google_Service_Storage
$storage = Google::make('storage');

// list buckets example
$storage->buckets->listBuckets('project id');

// get object example
$storage->objects->get('bucket', 'object');
```

Have a look at [google/google-api-php-client-services](https://github.com/google/google-api-php-client-services) to get a full list of the supported Google Services.

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 71.1% 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.

###  Release Activity

Cadence

Every ~128 days

Recently: every ~310 days

Total

17

Last Release

2063d ago

Major Versions

0.2.0 → 1.02015-08-08

1.0.x-dev → 2.02015-08-08

2.0.x-dev → 3.0.02016-07-20

3.1.4 → 4.0.02019-09-05

4.0.1 → 5.0.02020-09-14

PHP version history (4 changes)0.1.0PHP &gt;=5.4.0

4.0.0PHP &gt;=7.5

4.0.1PHP &gt;=7.2

5.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/476cb47fb2854d01d1f1ff9b8d1ebba0f5f6bc38314628b8ef3dcf2e531f3d46?d=identicon)[scottybo](/maintainers/scottybo)

---

Top Contributors

[![pulkitjalan](https://avatars.githubusercontent.com/u/4124930?v=4)](https://github.com/pulkitjalan "pulkitjalan (27 commits)")[![scottybo](https://avatars.githubusercontent.com/u/11498904?v=4)](https://github.com/scottybo "scottybo (3 commits)")[![tyteen4a03](https://avatars.githubusercontent.com/u/440015?v=4)](https://github.com/tyteen4a03 "tyteen4a03 (2 commits)")[![avanderbergh](https://avatars.githubusercontent.com/u/493849?v=4)](https://github.com/avanderbergh "avanderbergh (2 commits)")[![dreanmer](https://avatars.githubusercontent.com/u/5880810?v=4)](https://github.com/dreanmer "dreanmer (1 commits)")[![stevelacey](https://avatars.githubusercontent.com/u/289531?v=4)](https://github.com/stevelacey "stevelacey (1 commits)")[![threesquared](https://avatars.githubusercontent.com/u/892142?v=4)](https://github.com/threesquared "threesquared (1 commits)")[![palpalani](https://avatars.githubusercontent.com/u/716695?v=4)](https://github.com/palpalani "palpalani (1 commits)")

---

Tags

laravelgooglecloud platform

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scottybo-google-apiclient/health.svg)

```
[![Health](https://phpackages.com/badges/scottybo-google-apiclient/health.svg)](https://phpackages.com/packages/scottybo-google-apiclient)
```

###  Alternatives

[pulkitjalan/google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support

2582.9M5](/packages/pulkitjalan-google-apiclient)[revolution/laravel-google-sheets

Google Sheets API v4

4483.1M6](/packages/revolution-laravel-google-sheets)[thujohn/analytics

Google Analytics for Laravel 4

113108.7k1](/packages/thujohn-analytics)[schulzefelix/laravel-search-console

A Laravel package to retrieve data from Google Search Console

5037.8k1](/packages/schulzefelix-laravel-search-console)[scottybo/laravel-google-my-business

A package for Laravel which implements the Google My Business API

3360.3k](/packages/scottybo-laravel-google-my-business)

PHPackages © 2026

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