Skip to content

API access using own credentials (server to server flow)

Josh Radcliff edited this page Nov 15, 2017 · 5 revisions

This guide will walk you through how to setup OAuth2 for API access using your own credentials using server to server flow. These steps only need to be done once, unless you revoke or delete your OAuth2 credentials.

Step 1 - Creating OAuth2 credentials

Follow the steps for the product you're using to generate a *service account ID and a JSON key file, then come back to this page.

If you're an AdWords user, please note that this flow requires a Google Apps Domain.

Step 2 - Setting up the client library

AdWords

In your ads.properties file, set the full path to your JSON key file, and the email address of the user to impersonate:

api.adwords.jsonKeyFilePath=INSERT_PATH_TO_JSON_KEY_FILE_HERE
api.adwords.serviceAccountUser=INSERT_SERVICE_ACCOUNT_USER_HERE

DFP

In your ads.properties file, set the full path to your JSON key file:

api.dfp.jsonKeyFilePath=INSERT_PATH_TO_JSON_KEY_FILE_HERE
You can’t perform that action at this time.