I was recently tasked with retrieving AdWords data using Google’s AdWords API. In order to gain access to the API you need to create an MCC (My Client Center) account using a different email address then the one used to create your AdWords account. In doing so, you will now have a new Customer ID different then the Customer ID for your AdWords account. The MCC account is needed to attain a developer token along with an OAuth client ID, secret, access and refresh token.
Once I had everything, I dove into Google’s AWQL language which is a SQL-like language for performing queries against most common AdWords API services. I attempted to query the KEYWORDS_PERFORMANCE_REPORT and was immediately hit with a ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH error. I was dumbfounded. I went back and made sure I was correctly sending the access token, developer token and customer ID. Google’s API documentation says this means the type of report definition being created isn’t compatible with the account type.
- Attempting to create a cross-client report in a regular (ad serving) AdWords account.
- Attempting to create a single-client report in an MCC account.
It turns out the reason I was getting this error was because I was sending in the Customer ID of my MCC account instead of the Customer ID for my AdWords account. Even though my MCC account was linked to my AdWords account and the MCC was needed to gain access to the API, I couldn’t use the MCC Customer ID to retrieve reports from my AdWords account. I wish Google had mentioned this in their documentation instead of letting me waste a day figuring this out myself. Thanks for the time wasted Google. I hope this post helps other devs who are experiencing this same error.