Credentials for accessing Google's OAuth2 servers are required in order to authenticate and authorize Google Ads users. These credentials identify your application to Google, and allow you to generate OAuth tokens for managing Google Ads users. Access to Google OAuth2 credentials is managed from the Google API Console.
Create a project
Go to the Google API Console. Click Create project, enter a name, and click Create.
Enable the Google Ads API in your project
To enable the Google Ads API for your project, do the following:
Open the API Library in the Google API Console. If prompted, select your project or create a new one. The API Library lists all available APIs, grouped by product family and popularity.
Use search to find the Google Ads API if it isn't visible in the list.
Select the Google Ads API, then click the Enable button.
Choose an application type
There are two app type options for the Google Ads API:
- Installed application (recommended)
- Web application
Check the table below to determine which type is most appropriate for the app you want to build:
|Choose this app type||If ...|
|Installed app (recommended)||
Create a client ID and client secret
Once you've determined your app type, follow the instructions below to generate the OAuth2 client ID and client secret:
Open the Credentials page, select the project name you created above, or choose Create a new project and enter a name for the project.
Select Create credentials, then select 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.
Select the application type you would like to use, either Web application or Other (Installed Application).
On the Credentials page, copy the client ID and client secret to your clipboard, as you will need them when you configure your client library. You can also return to the credentials page later to retrieve these details.
Our client libraries do not support service accounts in the beta of the Google Ads API. Service accounts can still be used if you are sending raw API requests.
- You now have the credentials necessary to use OAuth2. These may be added to one of our client libraries to use in API calls. To do so now, configure a client library for OAuth in the Google Ads API.