Using the Google Ads API, if you call search() on a GoogleAdsServiceClient 
where the GoogleAdsServiceClient has a LoginCustomerId set one that does 
not have access to the CustomerId used in the search query, then instead of 
erroring it appears the query never returns.

In Google Ads API version 2 this would error with an 
unauthorised GoogleAdsException, in the latest version it just hangs. Is 
this a bug?

Example

GoogleAdsClient googleAdsClient = GoogleAdsClient
.newBuilder()
.setLoginCustomerId(managerAccountId)
.setDeveloperToken(getDeveloperToken())
.setCredentials(getCredentials())
.setEnableGeneratedCatalog(false)
.build();

String query = "SELECT customer_client.resource_name FROM customer_client 
LIMIT 1";
SearchGoogleAdsRequest request = SearchGoogleAdsRequest
.newBuilder()
.setCustomerId(Long.toString(childAccountId))
.setPageSize(1)
.setQuery(query)
.build();

try (GoogleAdsServiceClient googleAdsServiceClient = 
googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
googleAdsServiceClient.search(request);
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/4a57751c-2cd0-41f3-b4d9-bd1cde063e68n%40googlegroups.com.

Reply via email to