In my AdWords API program, I need to know both the clientEmail and the
customerId for all of my managed accounts.  I know how to get the
customerId if I have the clientEmail, but I don't know how to do the
reverse, at least not easily.

To get the customerId given the clientEmail, I just login via the API
using the clientEmail header to make the "effective user" be the
client account in question, and then call AccountService.getAccountInfo
(), and access the customerId field of the returned object.

I can also control the "effective user" by specifying the customerId
instead of the clientEmail, which is great, but there is no
clientEmail field of the AccountInfo object, as far as I can tell.

The only workaround that I can think of so far, to get the clientEmail
given the customerId, goes like this: login with the effective user of
the MCC account. Call getClientAccounts to receive an array of client
email addresses.  For each one in turn, use that as the clientEmail to
login and call getAccountInfo, and check if the returned customerId
matches the one I am looking for.  This seems quite inefficient and
wastes API quota as well.  Is there a simpler way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to