Hello Google Ads API team,
I'm using Google-ads-php library and following this example:
https://github.com/googleads/google-ads-php/blob/24928aeaf39acdab213f714b61b40828b1b8c8ec/examples/AccountManagement/GetAccountHierarchy.php

In this code part I get an error for at line 235 for code

foreach ($stream->iterateAllElements() as $googleAdsRow) ...

Error is:

Fatal error: Uncaught TypeError: Given value is not an instance of 
Google\Protobuf\Any. in ...google/common-protos/src/Rpc/Status.php:64

>From the fetch logs I see call fault:

Fault
-------
Status code: 7
Details: The caller does not have permission
Failure: 
{"errors":[{"errorCode":{"authorizationError":"CUSTOMER_NOT_ENABLED"},"message":"The
 
customer can't be used because it isn't 
enabled."}],"requestId":"Pn8ta2UONRLjpkCqgIPQtA"}  

And my question is how can I check that customer is enabled with separate 
API call may be?

I take customers list from 
$customerServiceClient->listAccessibleCustomers() response. I get 19 
customers ids as response and 2 of them are 'not enabled'. Can provide 
account details in private message. Basically I'm interested in info how 
can I catch this error preventively. 

Thanks in advance!

Oksana

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e69c311d-4a92-42f1-ae34-c40db02af4e5n%40googlegroups.com.
  • Av... 'Oksana Sulyma' via Google Ads API and AdWords API Forum
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... 'Oksana Sulyma' via Google Ads API and AdWords API Forum
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to