Hi,
I'm developing an automation tool which requires access to adwords account. I've gone through several blogs to access adwords API using java which says that a developer token is required for that. For that I need to create am mcc account it seems which I couldn't. So, please let me know, how to access adwords API to pull some reports using Java.
Here is the sample code that I'm using.
// Construct an AdWordsSession.
AdWordsSession session = new AdWordsSession.Builder()
.withClientCustomerId(clientCustomerId)
.fromFile()
.withClientCustomerId(clientCustomerId)
.withOAuth2Credential(oAuth2Credential)
.build();
ReportingConfiguration reportingConfiguration =
new ReportingConfiguration.Builder()
// Skip all header and summary lines since the loop below expects
// every field to be present in each line.
.skipReportHeader(true)
.skipColumnHeader(true)
.skipReportSummary(true)
// Enable to include rows with zero impressions.
.includeZeroImpressions(false)
.build();
session.setReportingConfiguration(reportingConfiguration);
ReportDownloaderInterface reportDownloader =
adWordsServices.getUtility(session, ReportDownloaderInterface.class);
Note: I have a client_id, client_secret and a refreshToken.
Appreciate your help in this.