I'm in the process of hooking my site into the AdWords API. I seem to be having an issue requesting any kind of data at all from the API.
The errors I receive are all AWQL syntax issues (e.g. Error in query: unexpected input DURING.
Here is my code:
GoogleAdsClient adClient = new GoogleAdsClient();
adClient.Config.OAuth2ClientId = "...";
adClient.Config.OAuth2ClientSecret = "...”;
adClient.Config.OAuth2RefreshToken = "...”;
adClient.Config.DeveloperToken = “...”;
var googleService = adClient.GetService(Google.Ads.GoogleAds.Services.V0.GoogleAdsService);
string query = @"SELECT Impressions,Clicks,Ctr FROM KEYWORDS_PERFORMANCE_REPORT DURING LAST_7_DAYS";
PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> response =
googleService.Search("MY_CUSTOMER_ID", query);
I am fairly certain the AWQL is ok so I'm wondering if it's the setup of the Service I'm using to execute the AWQL that is the issue. Can anyone see anything obvious here?
It looks like you're using the GoogleAds API, not the AdWords API. Could it be that?
If so, here's a migrate reports guide.