You can use the Agencies & Brands API to generate reports that can provide insights about the performance of your agency account.
Agency accounts
An agency account represents advertising agencies that interact with Google Ad Manager publishers. You can find the account ID for your agency account by viewing the Agency UI while logged in to your Google Account.
Set up authentication
Google APIs use the OAuth 2.0 protocol for authentication and authorization. Here's how to set up a Service Account to access the Agencies and Brands API:
If you haven't done so already, create a Google Cloud Project that hosts your credentials used to access the API.
Go to the Google Cloud console Enabled APIs page. Select the project you created earlier.
You see a list of enabled APIs and services. To access the Agencies & Brands API, you must enable it. If it isn't enabled, click +Enable APIs and services and search for Agencies & Brands API, select it, and click Enable.
It is a known issue that you might not be able to find the Agencies & Brands API with the Google Cloud Console search box. As an alternative, you can use Google Cloud CLI to enable the API instead. After you install gcloud CLI, you can enable the Agencies & Brands API with the following command:
gcloud services enable agenciesandbrands.googleapis.com --project=CLOUD_PROJECT_IDOn the navigation menu, select Credentials.
Click +Create credentials, and in the resulting menu select Service account.
Enter a name in the Name field for the service account. The Service account ID is created automatically upon creation. This value is needed in a later step. Optionally enter a description. Click Create and continue.
Optionally configure permissions for the service account and click Continue.
Optionally configure users or groups that can perform actions as the service account and click Done.
Your new service account is listed under Service Accounts. Click the service account ID you just created.
Click the Keys tab.
In the Add key menu, select Create new key.
Select JSON as the Key type, and click Create.
Download the key to your working directory. For more information about storing your key securely, see Managing service account keys. The key is used by your application to make API calls.
Share the service account ID with your technical account manager to link the service account with your agency account.
API scopes
When stepping through the OAuth 2.0 authorization flow to receive an access token used to make an API call, you must specify the API scope:
https://www.googleapis.com/auth/agencies-and-brands
Next steps
- Agencies and Brands API reference: Explore resources and methods in the API reference documentation.
- Release notes: Review updates and release history for the Agencies and Brands API.