Learn more about migrating to the Google Ads API by watching our latest webinar

OAuth Service Account Flow

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.

Step 1 - Creating OAuth2 credentials

Generate a service account ID and a *.JSON file by following the linked instructions, then come back to this page.

Step 2 - Setting up the client library using JSON configuration file

Configure the following keys in your google_ads_config.rb.

c.keyfile = 'path/to/keyfile.json'