i also using this code:
$googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();
$query = "
SELECT
customer_client.resource_name,customer_client.time_zone,customer_client.manager,customer_client.descriptive_name,customer_client.currency_code,customer_client.id
FROM customer_client";
$stream = $googleAdsServiceClient->search(123456,$query);
$res = $stream->iterateAllElements();
but it response nothing:
Generator Object ( )
also try:
$stream = $googleAdsServiceClient->searchStream(123456,$query);
$res = $stream->iterateAllElements();
response:
Streaming calls are not supported while using the REST transport.
i am testing on Windows 10, I don't want to use grpc.
在2020年10月23日星期五 UTC+8 上午9:13:33<吴文伟> 写道:
> Thanks for answer!
>
> For example:
> 123456 is the MCC account.
> this is my code:
>
> $CustomerClientServiceClient =
> $googleAdsClient->getCustomerClientServiceClient();
> $customers =
> $CustomerClientServiceClient->getCustomerClient("customers/12345/customerClients/Id");
>
> the request throw error:
> Google\ApiCore\ApiException{
> "message": "Requested entity was not found.",
> "code": 5,
> "status": "NOT_FOUND",
> "details": [
> {
> "@type": 0,
> "data": "type.googleapis.com
> \/google.ads.googleads.v5.errors.GoogleAdsFailure"
> },
> {
> "@type": 0,
> "data": [
> {
> "errorCode": {
> "requestError": "BAD_RESOURCE_ID"
> },
> "message": "'Id' part of the resource name is invalid."
> }
> ]
> }
> ]
> }
>
>
> i donot know the parameter "resourceName" format.
>
> can you help me,please!
> 在2020年10月23日星期五 UTC+8 上午3:32:13<adsapiforumadvisor> 写道:
>
>> Hi Wenwei,
>>
>> Thank you for reaching out. You could use
>> CustomerClientService.GetCustomerClient()
>> <https://developers.google.com/google-ads/api/reference/rpc/v5/CustomerClientService#getcustomerclient>
>>
>> to fetch the client customer accounts in the hierarchy. You could also
>> query the customer_client
>> <https://developers.google.com/google-ads/api/fields/v5/customer_client>
>> resource to fetch the data which is recommended.
>>
>> Thanks and regards,
>> Xiaoming, Google Ads API Team
>>
>>
>>
>> [image: Google Logo]
>> Xiaoming
>> Google Ads API Team
>>
>>
>> ref:_00D1U1174p._5004Q26BFbP:ref
>>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c2e83f4e-2c69-4170-a262-b4990d5afbcdn%40googlegroups.com.