Hello,

I am writing this post separately as suggested over here 
<https://groups.google.com/d/msg/adwords-api/9kD7TdySLcw/6IyHTC-SAgAJ>.
I was getting UNAUTHENTICATED error for a valid customerId when I ran a 
getCustomer service, which is based on list of account received from 
ListAllAccounts service.
I have around 20 accounts there which was listed from 
ListAccesibleCustomers service. I just wanted to list out all the accounts 
that can be managed by my main MCC account.

To do this process I need to cache the UNAUTHENTICATED error, but seems 
like GoogleAdsException is not caching those errors.

Code is like this.

        
$customerServiceClient = $googleAdsClient->getCustomerServiceClient();
$accessibleCustomers = $customerServiceClient->listAccessibleCustomers();


        foreach ($accessibleCustomers->getResourceNames() as $resourceName) 
{
            
            try {
                $customer = $customerServiceClient->getCustomer(
$resourceName);
                $customerId = ($customer->getId() != '') ? $customer->getId
()->getValue() : '';
            } catch (GoogleAdsException $e) {
                throw $e;
            }
        }


Thanks,



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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
--- 
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 [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d4fadd02-ad9d-471f-adf8-f501d4e0b4de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Google ... cv
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to