Hi Peter,
Thanks for you response , i've changed and now it looks good ,

another question that related to the development 




AdWordsSession adWordsSession =  
googleAuthenticator.initSession(token,customerId,dsJsonConfig);

long adId = Long.parseLong(adId);
Ad ad = new Ad();
ad.setId(adId);
ad.setFinalUrlSuffix(suffixUrlNewValue);


AdOperation operation = new AdOperation();
operation.setOperand(ad);
operation.setOperator(Operator.SET);

AdOperation[] operations = new AdOperation[] { operation };


AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance();
AdServiceInterface adService = adWordsServices.get(adWordsSession, 
AdServiceInterface.class);
AdReturnValue result = adService.mutate(operations);



and i got error :  
[AdError.INVALID_AD_TYPE @ operations[0].operand.id]





On Wednesday, April 17, 2019 at 9:28:51 AM UTC+3, [email protected] 
wrote:
>
> Hi ,
> i'm using the google ads library v201806 , 
> i'm trying to change the suffix url for creative the problem that when i'm 
> getting the creatives i got empty url for ads , 
> even with that they really have values .
>
> i'm using this code to get the creatives  : 
>
 

>
>  AdWordsSession adWordsSession =  
> googleAuthenticator.initSession(token,customerId,dsJsonConfig);
>         AdWordsServicesInterface adWordsServices = 
> AdWordsServices.getInstance();
>
>         AdServiceInterface adService =
>                 adWordsServices.get(adWordsSession, 
> AdServiceInterface.class);
>
>         int offset = 0;
>
>
>         String s = "";
> // Create selector.
>         SelectorBuilder builder = new SelectorBuilder();
>         Selector selector = builder
>                 .fields(AdField.Id,AdField.Url)
>                 //.in(AdField.Id,s)
>                 .offset(offset)
>                 .limit(500)
>                 .build();
>
>         AdPage page;
>         do {
>             // Get all campaigns.
>             page = adService.get(selector);
>
>             // Display campaigns.
>             if (page.getEntries() != null) {
>                 for (Ad ads : page.getEntries()) {
>                     System.out.printf("Campaign with name '%s' and ID %d 
> was found.%n", ads.getDisplayUrl(),
>                             ads.getId());
>                 }
>             } else {
>                 System.out.println("No campaigns were found.");
>             }
>
>             offset += 500;
>             selector = builder.increaseOffsetBy(500).build();
>         } while (offset < page.getTotalNumEntries());
>
>
>
>
> thanks in advance ,
> Asaad.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/99f61955-724f-4a28-815b-ed7843e43809%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Suffix ... asaad.awesat via AdWords API and Google Ads API Forum
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
    • Re... asaad.awesat via AdWords API and Google Ads API Forum
      • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to