Google Ads API का ऐक्सेस सेट अप करना

Summary

You must request a developer token and obtain authentication credentials to use the Google Ads API and make API calls on a Google Ads account. See the Quickstart guide for more detail.

Manual steps

To use the Google Ads API, complete the following steps:

Obtain a developer token

A Google Ads developer token connects your app to the Google Ads API.

  1. Follow the steps in Obtain Your Developer Token.
  2. After signing up, your token is pending approval.
  3. Make sure your software adheres to the Google Ads API Terms and Conditions (T&C) and the Required Minimum Functionality (RMF). RMF is only required for tokens with Standard Access.

You can retrieve the developer token for your manager account at any time in the Google Ads UI, under TOOLS & SETTINGS > SETUP > API Center.

You can use your developer token immediately with a test manager account. Your developer token must be approved before you can use it with production Google Ads accounts.

The API provides the following access levels:

  • Test
  • Basic
  • Standard

See Access Levels & Permissible Use for more information on each level.

Create test accounts

Test accounts aren't required, but they let you make API calls and test your code before your developer token is approved. Follow these instructions to create test accounts and test campaigns.

Choose a client library

Download one of the Google Ads API client libraries.

Code samples and installation instructions are included with each client library.

Set up OAuth2

OAuth2 lets your app operate on behalf of your account. This workflow is for desktop apps, see Configure a Google API Console Project for more information.

To use OAuth2 with Google APIs, create an OAuth2 client ID and client secret:

  1. While signed in to your manager account, open the Google API Console Credentials page.
  2. Expand the Projects drop-down, then choose NEW PROJECT.
  3. Enter a name for the project, then click CREATE.
  4. In the sidebar, click OAuth consent screen, then enter the required information, and click SAVE AND CONTINUE. See the OAuth guide for more details.
  5. In the sidebar, click Credenials > CREATE CREDENTIALS > OAuth client ID, then choose Desktop app.
  6. Enter a name for your client, then click CREATE.

This generates your client ID and client secret.

Get a refresh token

You also need a refresh token to access Google APIs.

To get a refresh token, follow the steps for your chosen client library. The steps are different for each programming language. See the authentication samples for each library.

Make your first API call

Follow the Google Ads API First call tutorial to make a simple call.

Automatic steps

Not available for this process.