The new Search Ads 360 Reporting API is now available. Join the searchads-api-announcements Google group to stay up to date on upcoming enhancements and releases.
Stay organized with collections
Save and categorize content based on your preferences.
One option for generating OAuth2 credentials is to use the OAuth2
Playground. The OAuth2 Playground, in conjunction with the Google Ads API console,
lets you manually create OAuth2 tokens.
The OAuth2 Playground is for users who only need to access the accounts for a
single manager account or Google Ads user. If you need to prompt multiple
users for credentials, it is likely better to configure a client library for
OAuth in Search Ads 360.
From the project drop-down, select an existing project or create a new one.
On the Credentials page, select Create credentials, then select
OAuth client ID.
Under Application type, choose Web application.
Under Authorized redirect URIs, add a line with:
https://developers.google.com/oauthplayground
Click Create.
On the Client ID page, take note of the client ID and client secret.
You'll need these in the next step.
If you have an existing cloud project, you can reuse it by setting the
Authorized redirect URIs as above.
Generate tokens
Go to the OAuth2
Playground,
(using this link should pre-populate some key values for you).
Click the gear icon
in the upper right corner and check the box labeled Use your own OAuth
credentials (if it isn't already checked).
Make sure that:
OAuth flow is set to Server-side.
Access type is set to Offline (this ensures you get a
refresh token and an access token, instead of just an access token).
Enter the OAuth2 client ID and OAuth2 client secret you obtained above.
In the section labeled Step 1 - Select & authorize APIs, click Search Ads 360 Reporting API from the list and select its scope,
https://www.googleapis.com/auth/doubleclicksearch. Then click Authorize APIs:
If prompted, sign in to the account to which you want to grant access and
authorization. Otherwise, confirm that the current user in the top
right corner is the client or manager account for whom you want to obtain
credentials.
Publish the app.
Keep the app in the Testing status, and add yourself as a test user.
A prompt appears indicating your app would like to
Manage your Search Ads 360 campaigns. Click Accept to continue.
In the tab labeled Step 2 - Exchange authorization code for tokens,
an Authorization code should appear. Click
Exchange authorization code for tokens.
If all goes well, the Refresh token and Access token should be
filled in for you (you may have to re-expand
Step 2 - Exchange authorization code for tokens):
Copy the Refresh token into the configuration file for your client
library of choice, along with the client ID and client secret.
Now that you have a refresh token, you no longer need the OAuth2 Playground
to be an authorized redirect URI. To remove it from the list of authorized
redirect URIs:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-11 UTC."],[[["The OAuth2 Playground enables manual creation of OAuth2 tokens for single manager account or Google Ads user access."],["To use the OAuth2 Playground, you need a client ID and client secret generated for a web application in the Google API Console."],["Generate refresh and access tokens using the OAuth2 Playground by authorizing the Search Ads 360 Reporting API."],["Configure your client library using the generated refresh token, client ID, and client secret for Search Ads 360 API access."],["After obtaining the refresh token, remove the OAuth2 Playground from the authorized redirect URIs in your Google API Console project."]]],["To generate OAuth2 credentials via the OAuth2 Playground, first create a web application client ID and secret in the Google API Console, adding `https://developers.google.com/oauthplayground` as an authorized redirect URI. Next, navigate to the OAuth2 Playground, input your credentials, and select the Search Ads 360 Reporting API scope. Authorize the API, exchange the authorization code for tokens, and copy the refresh token, client ID, and client secret to your client library configuration. Finally, remove the OAuth2 Playground URI from your authorized redirect URIs.\n"]]