To use the AdWords API, you must request a developer token and obtain a few authentication credentials. At that point, you will be able to make API calls on an AdWords account.
To use the AdWords API, complete the following steps:
Step 1: Obtain a developer token
An AdWords developer token allows your app to connect to the AdWords API. Follow the steps to obtain a developer token:
- Sign up for access to the AdWords API by following the steps on the Sign Up guide.
- After signing up, you will receive a developer token that is pending for approval.
To ensure the Token Review team accepts your application for a developer token, make sure your software adheres to the AdWords API Terms and Conditions (T&C) as well as the Required Minimum Functionality (RMF). See common reasons for rejection and how to re-apply in the Sign Up guide.
Retrieve your developer token at any time by signing in to your manager account in AdWords, then Settings (Gear icon) > Account settings > AdWords API Center.
- You can use your developer token immediately with a test manager account. Your developer token must be approved before using it with production AdWords accounts.
Step 2: Create test accounts
Go to the AdWords manager accounts page and create a test manager account. Follow the instructions on the Create test accounts section of the Make your first API call guide to create test accounts and test campaigns.
Step 3: Choose a client library
Download one of the AdWords API client libraries. The client libraries provide high-level view and basic building blocks of AdWords API functionality, making it easier to develop apps quickly. Code examples and installation instructions are bundled with each client library, available on the Google Ads GitHub repository.
Step 4: Set up authentication via OAuth2
Authentication via OAuth2 allows your app to operate on behalf of an account.
To enable your app to access the API, you need an OAuth2 client ID and client secret. This is how you obtain it:
- While logged in with your manager account credentials, open the Google API Console Credentials page.
- From the project drop-down, choose Create a new project, enter a name for the project, and click Create.
- Select Create credentials and choose OAuth client ID.
- You may be prompted to set a product name on the Consent screen; if so, click Configure Consent Screen, supply the requested information, and click Save to return to the Credentials screen.
Under Application type, choose Other for the purpose of this guide. Enter a name in the space provided.
Click Create. The OAuth2 client ID and client secret will appear. Copy and save these items. You will add them to the configuration file in your AdWords API library.
Step 5: Get an OAuth2 refresh token
To get a refresh token, follow the steps for your chosen client library. The steps differ slightly depending on the programming language of your choice. Examples can usually be found in the authentication samples for each library.
Step 6: Make your first API call
Follow this tutorial and try making a simple call to the AdWords API.
Not available for this process.