Download the PHP package joelbutcher/googleads without Composer
On this page you can find all versions of the php package joelbutcher/googleads. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joelbutcher/googleads
More information about joelbutcher/googleads
Files in joelbutcher/googleads
Package googleads
Short Description A lightweight and easy-to-configure extension for the Google Ads PHP Client, with OAuth2 support.
License MIT
Informations about the package googleads
Google Ads Client OAuth2 Wrapper
A lightweight and easy-to-configure extension for the Google Ads PHP Client, with OAuth2 support.
Installation
Install the package using composer
`composer require joelbutcher/googleads
Configuration
To configure the service, provide an array with your client_id
, client_secret
, developer_token
and Google Ads Account ID:
Note, if you're using an MCC (Manager account),
login_customer_id
will need to be your MCC account ID.
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 with Google.
Make sure to request the adwords scope in your OAuth2.0 authorization request.
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:
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:
Versioning
Currently, we only support V9 of the Google Ads SDK.
Changelog
Check out the CHANGELOG in this repository for all the recent changes.
Maintainers
Developed and maintained by Joel Butcher
Credits
You can view all contributers here
License
This pacakge is open-sourced software licensed under the MIT license.