ManagedCustomerService Returning Inactive Accounts

218 views
Skip to first unread message

charlie.tru...@gmail.com

unread,
Oct 5, 2020, 11:00:06 AM10/5/20
to AdWords API and Google Ads API Forum
I thought ManagedCustomerService was supposed to only return active accounts?  However, it seems that over the weekend, it started returning inactive accounts which caused subsequent API failures in my code due to AuthorizationError.CUSTOMER_NOT_ACTIVE.

LE GCR

unread,
Oct 5, 2020, 2:55:50 PM10/5/20
to AdWords API and Google Ads API Forum
I am encountering the same change in response from ManagedCustomerSerivce since Sunday morning.  Has there been a predicate which needs to be added to the accounts lookup request to ignore inactive accounts?

Google Ads API Forum Advisor Prod

unread,
Oct 6, 2020, 12:08:31 AM10/6/20
to sema...@localedge.com, adwor...@googlegroups.com
Hi everyone,

So our team can investigate, could you both send over your respective complete request and response logs?

Also, you may send your replies using the Reply privately to author option.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q25ZEGf:ref

LE GCR

unread,
Oct 6, 2020, 7:40:09 AM10/6/20
to AdWords API and Google Ads API Forum
We are executing the following method to extract all accounts (Customer ids) associated to our topLevelAcct.  We take the results of this method and make individual calls on each account to extract Google Ads Reports (Criteria, KeywordPerformance and Ad Performance) on these accounts.  The subsequent report requests on many of the accounts result in 'ApiException{applicationExceptionType=ApiException, errors=[AuthorizationError{apiErrorType=AuthorizationError, errorString=AuthorizationError.CUSTOMER_NOT_ACTIVE, fieldPath=, reason=CUSTOMER_NOT_ACTIVE, trigger=<null>}]}'

Up to and through Saturday evening the ManagedCustomerService was not returning inactive Customers.  Sunday morning just after midnight eastern standard time, inactive accounts have been returned.

What has changed?  

Is there a way to modify the ManagedCustomerService request to not return inactive accounts(Customers)

Thank you for your assistance.

public Set<Account> getSubAccounts(final String topLevelAcct) {
final Set<Account> toReturn = new HashSet<>();
final Set<Account> parentAccounts = new HashSet<>();
final Credential creds = getOAuth2Credentials(topLevelAcct);
if (null == creds) {
return toReturn;
}
final AdWordsSession session = createAdWordsSession(creds, topLevelAcct, topLevelAcct);
final AdWordsServices services = new AdWordsServices();
ManagedCustomerServiceInterface mcs = services.get(session, ManagedCustomerServiceInterface.class);
int offset = 0;
SelectorBuilder builder = new SelectorBuilder()
.fields(ManagedCustomerField.CustomerId, ManagedCustomerField.Name)
.offset(offset)
.limit(10000);

ManagedCustomerPage page = null;
do {
try {
page = mcs.get(builder.build());
offset += 100;
} catch (RemoteException e) {
System.err.println("RemoteException getting account info:");
e.printStackTrace();
}
if (null != page) {
ManagedCustomer[] customers = page.getEntries();
for (ManagedCustomer customer : customers) {
Account acct = new AdWordsAccount(customer.getCustomerId());
toReturn.add(acct);
if (customer.getCanManageClients() != null && customer.getCanManageClients()) {
parentAccounts.add(acct);
}
}
builder.offset(offset);
page = null;
} else {
System.err.println("Page was null!");
break;
}
} while(null != page && toReturn.size() < page.getTotalNumEntries());

if (!parentAccounts.isEmpty()) {
for (Account pAcct : parentAccounts) {
pAcct.addSubAccounts(getSubAccounts(pAcct.getId()));
}
}
return toReturn;

Google Ads API Forum Advisor Prod

unread,
Oct 6, 2020, 3:45:52 PM10/6/20
to sema...@localedge.com, adwor...@googlegroups.com
Hello,

I do not believe there have been any changes on the API's end. Unfortunately, you will not be able to filter out inactive accounts as there is no filterable field for account status. The available fields are listed here.

Can you please provide your top level account's manager account ID so that I can take a look? Additionally, I can see that you have provided your code snippet, but not actual logs. You can enable logging by following this guide in the README of your respective client library. Please send this information to our support alias googleadsa...@google.com if you are unable to reply privately.

Regards,
Google Logo
Danica
Google Ads API Team
 


ref:_00D1U1174p._5004Q25ZEGf:ref

Vine Gaming

unread,
Oct 6, 2020, 4:09:19 PM10/6/20
to charlie.tru...@gmail.com, AdWords API and Google Ads API Forum
What can I do?


On Mon, Oct 5, 2020 at 10:00 PM charlie.tru...@gmail.com <charlie.tru...@gmail.com> wrote:
I thought ManagedCustomerService was supposed to only return active accounts?  However, it seems that over the weekend, it started returning inactive accounts which caused subsequent API failures in my code due to AuthorizationError.CUSTOMER_NOT_ACTIVE.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/07eb04a9-5bdc-47ab-938f-dbd629f73971n%40googlegroups.com.

Google Ads API Forum Advisor Prod

unread,
Oct 7, 2020, 2:24:22 AM10/7/20
to samvisalp...@gmail.com, charlie.tru...@gmail.com, adwor...@googlegroups.com
Hi Vine Gaming,

Could you confirm if your concern is related to the current discussion in this thread? If yes, could you add more details about the issue on your end so our team can provide the appropriate support?

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q25ZEGf:ref

LP AI

unread,
Oct 8, 2020, 3:56:03 AM10/8/20
to AdWords API and Google Ads API Forum
We are having the exact same issue and like everyone else this has appeared in the last couple of days. We use ManagedCustomerService to get the list of accounts that we can query with reports. When we start to query them with reports we are getting AuthorizationError.CUSTOMER_NOT_ACTIVE. 

S S

unread,
Oct 8, 2020, 7:41:34 AM10/8/20
to AdWords API and Google Ads API Forum
++
the same behavior last couple of days.  all accounts are returned (active and disabled) and we cannot distinguish which can be used and which can't (((

Google Ads API Forum Advisor Prod

unread,
Oct 8, 2020, 1:49:42 PM10/8/20
to rgserv...@gmail.com, adwor...@googlegroups.com
Hi Everyone,

Our team is aware of this issue and a bug has been filed to further investigate what is causing this behavior. We will update you once we have more insight. Thank you all for your patience.

Regards,
Google Logo
Danica
Google Ads API Team
 


ref:_00D1U1174p._5004Q25ZEGf:ref

Google Ads API Forum Advisor Prod

unread,
Oct 12, 2020, 11:45:08 AM10/12/20
to dienmi...@gmail.com, rgserv...@gmail.com, adwor...@googlegroups.com
Greetings!

It looks like the issue is now fixed. Please take a look. If you're still seeing issues, please get back to me on this thread.

Best,
​​​​​​​Nadine Wang, Google Ads API Team

ref:_00D1U1174p._5004Q25ZEGf:ref

Nguyễn Thanh

unread,
Oct 12, 2020, 11:47:17 AM10/12/20
to Google Ads API Forum Advisor Prod, rgserv...@gmail.com, adwor...@googlegroups.com
Yes, it is working. 

Vào 22:44, T.2, 12 Th10, 2020 Google Ads API Forum Advisor Prod <adsapifor...@gmail.com> đã viết:
Reply all
Reply to author
Forward
0 new messages