Google Ads API Sample Application

A demo application showing how to use Google Ads API within Laravel

Steps

  1. Make sure you have an OAuth2 client ID and secret, a developer token, and a refresh token ready. If not, follow these instructions to get them.
  2. Copy your configured google_ads_php.ini, needed for the Google Ads API client library for PHP, to the root directory of this sample app.
  3. That's it!
Pause a campaign of the specified customer ID
The ID of the customer account to pause the campaign from, e.g., 1234567890.
The ID of the campaign to pause, e.g., 1234567890.
Show a report for the specified customer ID using GAQL.
The ID of the customer account to show the report for, e.g., 1234567890.
Some fields specific to the specified type will also be selected. For example, campaign.id and campaign.status will be selected when campaign is specified.
Metric fields to be retrieved:

Need help on Google Ads API? Contact us here.