Google Ads failure details: authorization_error: The customer can't be used because it isn't enabled.

743 views
Skip to first unread message

John Lee

unread,
Apr 2, 2022, 2:58:51 AM4/2/22
to Google Ads API and AdWords API Forum
I am currently trying to get all the child accounts for a manager account.
Request ID: mCqXs9CAU-CwEzP7x8tFMg

Error: Google Ads failure details: authorization_error: The customer can't be used because it isn't enabled.

I am using the php library and following the guide to get account hierarchies here: 

I am passing the loginCustomerId
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile('../../Dashboard/php/google-ads-php/google_ads_php.ini')
->withOAuth2Credential($oAuth2Credential)
->withLoginCustomerId($loginCustomerId ?? $rootCustomerId)
->build();

I am using a basic access developer token and the manager account is active and not a testing account.

Any help would be appreciated, let me know if you need more information.

Thank you.

John Lee

unread,
Apr 2, 2022, 3:22:14 AM4/2/22
to Google Ads API and AdWords API Forum
I believe I solved this by adding an additional filter to the Customer Client query.
This filter removed non active or test accounts, which I am guessing caused the customer isn't enabled error.

Original Query:
$query = 'SELECT customer_client.client_customer, customer_client.level,'
. ' customer_client.manager, customer_client.descriptive_name,'
. ' customer_client.currency_code, customer_client.time_zone,'
. " customer_client.id FROM customer_client WHERE customer_client.level <= 1";

New Query

$query = 'SELECT customer_client.client_customer, customer_client.level,'
. ' customer_client.manager, customer_client.descriptive_name,'
. ' customer_client.currency_code, customer_client.time_zone,'
. " customer_client.id FROM customer_client WHERE customer_client.level <= 1 and customer_client.test_account != TRUE and customer_client.status = 'ENABLED'";

Google Ads API Forum Advisor

unread,
Apr 3, 2022, 10:30:39 PM4/3/22
to made2...@gmail.com, adwor...@googlegroups.com
Hi John,

Thank you for reaching out to us.

Upon checking the error, it seems that it is related to CUSTOMER_NOT_ENABLED . Please note that it is not possible to make API requests against canceled / not enabled accounts unless you will reactivate it by following this guide .

You may also note that starting version 10 , you can indeed use the filters you provided to prevent including inactive accounts in your other API requests.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ZJ5yw:ref

Steven Zhang

unread,
Apr 10, 2022, 9:25:55 AM4/10/22
to Google Ads API and AdWords API Forum
This is the correct solution.

Google Ads API Forum Advisor

unread,
Apr 10, 2022, 10:49:42 PM4/10/22
to ste...@whitehardt.com, adwor...@googlegroups.com

Hi Steven,

Thank you for sharing this.

If you have further questions, please feel free to add those in this thread. Our team will be happy to assist and give support to you.

Regards,

Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ZJ5yw:ref
Reply all
Reply to author
Forward
0 new messages