AI-generated Key Takeaways
-
This guide explains how to set up OAuth2 for API access using your own credentials with service accounts.
-
The setup steps only need to be done once unless credentials are revoked or deleted.
-
This process requires a Google Workspace domain and domain-wide delegation for the service account by a super administrator.
-
You will need to generate a service account ID and a *.JSON file and then configure your client library with the JSON file.
This guide will walk you through how to setup OAuth2 for API access using your own credentials using service accounts. These steps only need to be done once, unless you revoke or delete your OAuth2 credentials.
Create OAuth2 credentials
Generate a service account ID and a *.JSON file by following the linked instructions, then come back to this page.
Set up client library with JSON file
Configure the following keys in your
google_ads_config.rb
.
c.keyfile = 'path/to/keyfile.json'
c.impersonate = 'INSERT_EMAIL_ADDRESS_TO_IMPERSONATE_HERE'