The PHP client library

  • The PHP client library for Google Ads is hosted on GitHub and available via Composer and Packagist.

  • The minimum supported PHP version is found in the composer.json file.

  • The library depends on gRPC; refer to the "Getting started" and "Basic usage" guides before use.

  • Guides are available for setting up the client library with various OAuth flows (desktop, web, service account).

  • Additional guides cover various library features and utilities such as configuration, logging, Docker, and performance.

The PHP client library is hosted on GitHub, and is also available through Composer and Packagist. It offers several features to help you use the API, including easier management of credentials and creation of Google Ads API service clients.

Requirements

The library requires PHP 8.1 or later. You can check the minimum PHP version that this library supports in composer.json. The version is specified as the value of the php key under require.

As indicated in composer.json, the library depends on gRPC.

Get started

Follow the quick start guide to make your first API call.

To install the library into your application, use Composer:

composer require googleads/google-ads-php

Basic usage

Refer to the basic usage guide to learn more about how to use the PHP client library.

Authentication

The PHP client library supports multiple approaches to authentication and authorization. Refer to the authentication guide to learn more.

Configuration and logging

The PHP client library supports multiple configuration and logging options.

Utilities

The PHP client library includes utility classes to improve API usability. Refer to the following guides to learn more:

Performance

Refer to the Performance guide for recommendations on how to fine-tune your application's performance.