And The missing campaign has 1 ad-group, ad-group-type is 
'DISPLAY_ENGAGEMENT'.



On Thursday, 10 October 2019 10:48:47 UTC+9, jeonhwan won wrote:
>
> Hi there,  let say I have 10 campaigns. And for some specific campaign, I 
> can't get the information.
> Like I can get only 9 campaigns... one campaign is missing
>
> The interesting thing is when I try AdWords API  I can get all data.  
>
> Is there any possibility I can't get all campaign information when I use 
> Ads API? 
> So I must use AdWords API? 
>
>
>
>
> Here is the code for ads API
> ```
> GoogleAdsServiceClient googleAdsServiceClient = 
> googleAdsClient.getLatestVersion().createGoogleAdsServiceClient();
>         SearchGoogleAdsRequest request = 
> SearchGoogleAdsRequest.newBuilder()
>                 .setCustomerId(testCustomerId) 
>                 .setPageSize(10000)
>                 .setQuery("SELECT campaign.id, campaign.name FROM 
> campaign")
>                 .build();
>         GoogleAdsServiceClient.SearchPagedResponse searchPagedResponse = 
> googleAdsServiceClient.search(request);
> ```
>
> This is the code for AdWords API
> ```
> Credential credential = 
> gas.getOfflineCredential(gas.getGoogleMezzoRefreshToken());
>             AdWordsSession session = gas.getAdWordsSession(credential, 
> testCustomerId);
>             AdWordsServicesInterface adWordsServices =  
> AdWordsServices.getInstance();
>             CampaignServiceInterface campaignService= 
> adWordsServices.get(session, CampaignServiceInterface.class);
> int offset = 0;
> int page_size = 100;
> SelectorBuilder builder = new SelectorBuilder();
>             Selector selector = builder
>                     .fields(CampaignField.Id, CampaignField.Name, 
> CampaignField.Status)
>                     .offset(offset)
>                     .limit(page_size)
>                     .build();
>  do {
>                page = campaignService.get(selector);
>                 log.debug("campaigns count: {}", 
> page.getTotalNumEntries());
> } while (offset < page.getTotalNumEntries());
> ```
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/a32a7141-1f07-4f8b-b355-9701421dc208%40googlegroups.com.

Reply via email to