AI-generated Key Takeaways
-
Creating and configuring a Google API Console project for Google Ads API access depends on your chosen OAuth 2.0 authorization scenario (service accounts or user authentication).
-
A Google API Console project is necessary to create OAuth 2.0 credentials and enable the Google Ads API, which are needed to generate tokens for API calls.
-
While a single developer token can be used across multiple projects, each project can only use one developer token.
-
To set up for Google Ads API use, you need to select or create a Google API Console project and enable the Google Ads API within it.
-
For service account authorization, you must create a service account and download its key in JSON format.
The steps to be followed for creating and configuring a Google API Console project depends on the type of OAuth 2.0 authorization scenario you are building in your application. Choose the authorization scenario you are building for; this guide will be customized based on your choice.
You need a Google API Console project for creating OAuth 2.0 credentials, and enabling the Google Ads API for your app.
The credentials are needed for the authentication and authorization of Google Ads users by Google servers. These credentials let you generate OAuth tokens to be used in calls to the API.
Although you can use a single developer token for multiple projects, each project can use only a single developer token.
Select or create a Google API Console project
Follow the instructions to create a project. Enabling billing for your project is optional. If you have billing enabled, select a billing account for the new project. There is no charge for using the Google Ads API, but there is a quota on the total number of Cloud projects.
Enable the Google Ads API in your project
To enable the Google Ads API in your project, follow these steps:
Open the API Library in the Google API Console. If prompted, select your project or create a new one. The API Library lists all available APIs, grouped by product family and popularity.
Use search to find the Google Ads API if it isn't visible in the list.
Select the Google Ads API, then click the Enable button.
Configure the OAuth consent screen
When you use OAuth 2.0 for authorization, Google displays a consent screen to the user including a summary of your project, its policies, and the requested authorization scopes of access. Configuring your app's OAuth consent screen defines what is displayed to users and app reviewers, and registers your app so you can publish it later.
Follow the instructions
to configure an OAuth consent screen for your application and add
https://www.googleapis.com/auth/adwords as an OAuth scope.
Create a client ID and client secret
You can skip this step if you're using an existing Google API Console project that already has a generated client ID and client secret. Otherwise, create a client ID and client secret by following the instructions. You may choose either Desktop app or Web application as the application type. Once you create the OAuth 2.0 client, download the client's JSON file by first clicking its Download OAuth client icon and then the DOWNLOAD JSON button on the following screen.