Set up a Google API Console project

You need a Google API Console project for creating OAuth 2.0 credentials, configuring a user consent screen, 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.

Select or create a Google API Console project

If you already have a Google API Console project and want to use it to create credentials, you can skip to Create a client ID and client secret.

To create a project,

  • Go to the Google API Console
  • Click Create project
  • Enter a name or accept the generated suggestion
  • Confirm or edit any remaining fields
  • Click Create

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.

If you're using an existing Google API Console project and have configured an OAuth consent screen before, then you can skip this step and modify your consent screen instead by adding the Google Ads API OAuth 2.0 scope.

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.

  1. Open the Consent Screen page and select your project in the drop-down menu at the top of the page.
  2. Select the User Type and click CREATE.
  3. Fill out the consent screen form. You can edit this later if needed. Click SAVE AND CONTINUE when done.
  4. On the next page, click ADD OR REMOVE SCOPES.
  5. Scroll down and enter the following in the field under Manually add scopes:

    https://www.googleapis.com/auth/adwords

  6. Click ADD TO TABLE.
  7. Add any other scopes your project might need, then click UPDATE.
  8. Click SAVE AND CONTINUE.
  9. If you don't plan to publish your project immediately, add the email address of each user account you might use for testing, then click SAVE AND CONTINUE.
  10. Review the summary page and click BACK TO DASHBOARD.
  1. Open the Consent Screen page, and select your project in the drop-down menu at the top of the page.
  2. Click EDIT APP.
  3. Click SAVE AND CONTINUE on the OAuth consent screen form.
  4. On the next page, click ADD OR REMOVE SCOPES.
  5. Scroll down and enter the following in the field under Manually add scopes:

    https://www.googleapis.com/auth/adwords

  6. Click ADD TO TABLE.
  7. Click SAVE AND CONTINUE.
  8. Click SAVE AND CONTINUE on the Test users form.
  9. Review the summary page and click BACK TO DASHBOARD.

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 secret.

After you've determined your app type, follow the instructions below to generate the OAuth 2.0 client ID and client secret:

  1. Open the Credentials page. Select a previously created project or create a new one.

  2. On the Credentials screen, click CREATE CREDENTIALS, then select OAuth client ID.

    • If you haven't configured an OAuth consent screen for this project previously, click CONFIGURE CONSENT SCREEN.

      • Select the user type and click CREATE.

      • Fill out the initial form. You can edit this later if needed. Click Save when done.

    • Navigate back to Credentials > CREATE CREDENTIALS > OAuth client ID to continue.

  3. Select either Desktop app or Web application as the app type, depending on your use case. This guide uses Desktop app as the app type.

  4. Fill in a name for the app, then click Create.

  5. On the confirmation page, copy Your Client ID and Your Client Secret to your clipboard for configuring your client library later. Also, download the credentials in JSON format to a file named credentials.json.

Enable the Google Ads API in your project

To enable the Google Ads API in your project, follow these steps:

  1. 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.

  2. Use search to find the Google Ads API if it isn't visible in the list.

  3. Select the Google Ads API, then click the Enable button.