Re: Throw “This operation is not permitted on this campaign type” when I create an AdGroupAd
Hello, Thank you for your guidance.This problem has been solved. On Wednesday, August 14, 2019 at 4:01:59 AM UTC+8, adsapiforumadvisor wrote: > > Hello, > > Since you are using the APP campaigns it wont support the specific ad > status field. Since the Ads for APP campaings shows using the asserts > uploaded and they cannot be paused. So you can pause at the AdGroup and > campaign levels only for APP campaigns. Please let me know if you have any > further questions. > > This part of code snippet causing the issue: " 'status' => > *AdGroupAdStatus::PAUSED*," > > Regards, > Sai Teja, Google Ads API Team > > > ref:_00D1U1174p._5001UEIiNN: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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/082ab63b-1942-464c-9799-2f8a18eaa2a2%40googlegroups.com.
RE: Throw “This operation is not permitted on this campaign type” when I create an AdGroupAd
Hello, Since you are using the APP campaigns it wont support the specific ad status field. Since the Ads for APP campaings shows using the asserts uploaded and they cannot be paused. So you can pause at the AdGroup and campaign levels only for APP campaigns. Please let me know if you have any further questions. This part of code snippet causing the issue: " 'status' => AdGroupAdStatus::PAUSED," Regards, Sai Teja, Google Ads API Team ref:_00D1U1174p._5001UEIiNN: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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/UdAbd0PW6YAN00L_IHUhu9SOu5NbAS1sdd3g%40sfdc.net.
Throw “This operation is not permitted on this campaign type” when I create an AdGroupAd
Hello, When I call the Google Ads API(V2) to create an AdGroupAd, throw an error about “This operation is not permitted on this campaign type” .[image: 1565602956447.jpg] before this,I have set the Campaign advertising_channel_type=MULTI_CHANNEL,advertising_channel_sub_type=APP_CAMPAIGN,AdGroup type=UNSPECIFIED. and here is my code about create AdGroupAd: public static function runExample( GoogleAdsClient $googleAdsClient, $customerId, $adGroupId ) { $adGroupResourceName = new StringValue(['value' => ResourceNames::forAdGroup($customerId, $adGroupId)]); $asset_operations = []; $ad_operations = []; $asset = new Asset([ 'youtube_video_asset' => new YoutubeVideoAsset([ 'youtube_video_id' => new StringValue(['value' => 'adZeOuXpqIQ']) ]), 'type' => AssetType::YOUTUBE_VIDEO, ]); $assetOperation = new AssetOperation(); $assetOperation->setCreate($asset); $asset_operations[] = $assetOperation; $assetServiceClient = $googleAdsClient->getAssetServiceClient(); $response = $assetServiceClient->mutateAssets($customerId,$asset_operations); foreach ($response->getResults() as $asset) { $assetResourceName = $asset->getResourceName(); } $appAdInfo = new AppAdInfo([ 'youtube_videos'=>[ new AdVideoAsset([ 'asset'=>new StringValue(['value' => $assetResourceName]), ]) ], ]); //Sets the expanded text ad info on an Ad. $ad = new Ad([ 'type'=>AdType::APP_AD, 'app_ad'=>$appAdInfo, ]); // Creates an ad group ad to hold the above ad. $adGroupAd = new AdGroupAd([ 'ad_group' => $adGroupResourceName, 'status' => AdGroupAdStatus::PAUSED, 'ad'=>$ad, ]); // Creates an ad group ad operation and add it to the operations array. $adGroupAdOperation = new AdGroupAdOperation(); $adGroupAdOperation->setCreate($adGroupAd); $ad_operations[] = $adGroupAdOperation; // Issues a mutate request to add the ad group ads. $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient(); $response = $adGroupAdServiceClient->mutateAdGroupAds($customerId, $ad_operations); foreach ($response->getResults() as $addedAdGroupAd) { /** @var AdGroupAd $addedAdGroupAd */ printf( "Expanded text ad was created with resource name: '%s'%s", $addedAdGroupAd->getResourceName(), PHP_EOL ); } } } How to solve this problem? Thank you -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/b7cf1599-b42f-472b-8f7d-c776f2a06547%40googlegroups.com.