PHPackages                             joelbutcher/googleads-client-oauth2-wrapper - 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. joelbutcher/googleads-client-oauth2-wrapper

Abandoned → [joelbutcher/googleads](/?search=joelbutcher%2Fgoogleads)ArchivedLibrary

joelbutcher/googleads-client-oauth2-wrapper
===========================================

v1.0.0(5y ago)114MITPHPPHP ^7.3|^8.0

Since Mar 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/joelbutcher/googleads-client-oauth2-wrapper)[ Packagist](https://packagist.org/packages/joelbutcher/googleads-client-oauth2-wrapper)[ Fund](https://paypal.me/joelbutcher)[ GitHub Sponsors](https://github.com/joelbutcher)[ RSS](/packages/joelbutcher-googleads-client-oauth2-wrapper/feed)WikiDiscussions 1.x Synced today

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

Google Ads Client OAuth2 Wrapper
================================

[](#google-ads-client-oauth2-wrapper)

 [ ![Build Status](https://github.com/joelbutcher/googleads-client-oauth2-wrapper/workflows/tests/badge.svg) ](https://github.com/joelbutcher/googleads-client-oauth2-wrapper/actions) [ ![Total Downloads](https://camo.githubusercontent.com/424a02239a8e4b91d7e9ed93c1d3369787e3f0b9d37d283a84638b3816379e2b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f656c627574636865722f676f6f676c656164732d636c69656e742d6f61757468322d77726170706572) ](https://packagist.org/packages/joelbutcher/googleads-client-oauth2-wrapper) [ ![Latest Stable Version](https://camo.githubusercontent.com/029921588f4827be25a9486829eac1cb3cf77c155ed72ab4a9d5286fbfd39c82/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f656c627574636865722f676f6f676c656164732d636c69656e742d6f61757468322d77726170706572) ](https://packagist.org/packages/joelbutcher/googleads-client-oauth2-wrapper) [ ![License](https://camo.githubusercontent.com/7dc21c098b1d95f11bcd738fe868906278fe1070b8b712e0a5999e3f9ab1676c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6f656c627574636865722f676f6f676c656164732d636c69656e742d6f61757468322d77726170706572) ](https://packagist.org/packages/joelbutcher/googleads-client-oauth2-wrapper)

A lightweight and easy-to-configure OAuth2 wrapper for the Google Ads PHP library.

Configuration
-------------

[](#configuration)

To configure the service, provide an array with your `client_id`, `client_secret`, `developer_token` and Google Ads Account ID:

```
  $config = [
      'client_id' => ''
      'client_secret' => ''
      'developer_token' => ''
      'login_customer_id' => ''
  ];

  $googleAds = new GoogleAds($config);
```

> Note, if you're using an MCC (Manager account), `login_customer_id` will need to be your MCC account ID.

Usage
-----

[](#usage)

Once you've configured the client, you are then ready to start using the client to interact with Google Ads. First, we need to authorize the user with a refresh token. This can be obtained from a simple [OAuth flow](https://github.com/googleapis/google-api-php-client#authentication-with-oauth) with Google.

> Make sure to request the adwords scope in your OAuth2.0 authorization request.

```
  // ...
  $googleAds->authorize($refreshToken);
```

If you're using an MCC and have configured your `login_customer_id` to use the MCC account ID, you will need to pass the ID of the account you are acting on behalf of, as the second parameter to the `authorize` method:

```
  // ...
  $googleAds->authorize($refreshToken, '');
```

Interacting with Google Ads PHP SDK
-----------------------------------

[](#interacting-with-google-ads-php-sdk)

Now that you're all configured and authenticated, you can now begin interacting with the underlying `GoogleAdsClient` class. You can call any of the services found here directly from the your `$googleAds` instance from the snippets above. For example, to retrieve the Campaign Service Client, simply call the following:

```
  // ...
  $googleAds->getCampaignServiceClient();
```

Versioning
----------

[](#versioning)

Currently, we only support v6 of the client.

Changelog
---------

[](#changelog)

Check out the [CHANGELOG](CHANGELOG.md) in this repository for all the recent changes.

Maintainers
-----------

[](#maintainers)

Developed and maintained by [Joel Butcher](https://joelbutcher.co.uk)

Credits
-------

[](#credits)

You can view all contributers [here](https://github.com/joelbutcher/googleads-client-oauth2-wrapper/graphs/contributors)

License
-------

[](#license)

This pacakge is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

1864d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb6903ee363d9201681e47a2dcbe12148b7d299dd9e37229cad774ecd923fd6e?d=identicon)[joelbutcher](/maintainers/joelbutcher)

---

Top Contributors

[![joelbutcher](https://avatars.githubusercontent.com/u/7163152?v=4)](https://github.com/joelbutcher "joelbutcher (3 commits)")

---

Tags

googleAdvertisingGoogleAds

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joelbutcher-googleads-client-oauth2-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/joelbutcher-googleads-client-oauth2-wrapper/health.svg)](https://phpackages.com/packages/joelbutcher-googleads-client-oauth2-wrapper)
```

###  Alternatives

[spatie/laravel-google-calendar

Manage events on a Google Calendar

1.4k1.5M21](/packages/spatie-laravel-google-calendar)[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[revolution/laravel-google-sheets

Google Sheets API v4

4483.1M6](/packages/revolution-laravel-google-sheets)[pulkitjalan/google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support

2582.9M5](/packages/pulkitjalan-google-apiclient)[mastani/laravel-google-static-map

Laravel Google Static Map Generator

471.5M8](/packages/mastani-laravel-google-static-map)[codeat3/blade-google-material-design-icons

A package to easily make use of "Google Fonts Material Icons" in your Laravel Blade views.

23494.4k4](/packages/codeat3-blade-google-material-design-icons)

PHPackages © 2026

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