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.

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

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

Configure the following keys in your App.config / Web.config.

<add key="OAuth2Mode" value="SERVICE_ACCOUNT" />
<add key="OAuth2SecretsJsonPath" value="INSERT_OAUTH2_SECRETS_JSON_FILE_PATH_HERE" />
<!-- If using AdWords, supply the email for impersonation. If using Google Ad Manager, remove this key. -->
<add key="OAuth2PrnEmail" value="INSERT_OAUTH2_USER_EMAIL_HERE" />
Clone this wiki locally