Hi, 

Once an AdGroup has been removed you can no longer mutate any attributes of 
its Criteria or Ads. You'll encounter an OperationAccessDenied 
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupAdService.OperationAccessDenied>
 error 
if you try to do so. To avoid this error, you can do the following:

   1. Use AdGroupService.get 
   
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupService#get>
 to 
   select all AdGroups with Status = 'REMOVED', and store those AdGroupIds.
   2. When selecting Ads via AdGroupAdService.get 
   
<https://developers.google.com/adwords/api/docs/reference/v201702/AdGroupAdService#get>,
 
   include two predicates:
     - Status IN ['ENABLED', 'PAUSED']
     - AdGroupId NOT_IN [ list of removed ad group IDs from step 1 ]

Please note the same applies to campaigns which are removed as well, and 
you need to use CampaignService.get 
<https://developers.google.com/adwords/api/docs/reference/v201702/CampaignService#get>
 to 
retrieve campaigns which are removed and use in a predicate to filter out 
Ads from removed campaigns. 

Regards,
Shwetha, AdWords API Team.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 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/79389b4f-6e1a-46b6-8849-6f0c2a5ecdcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to