This campaign is a brand new campaign I am creating, so it is not set up as an experiment unless it is a default setting. Here's the code, using Java (google-ads 10.1.0) (note System.currentTimeMillis() -- to ensure for the purposes of this test that this is a unique name): =================== CampaignBudget budget = CampaignBudget.newBuilder().setName("my_test_budget" + System.currentTimeMillis()) .setDeliveryMethod(BudgetDeliveryMethod.STANDARD) .setAmountMicros(1000L).build();
CampaignBudgetOperation budgetOp = CampaignBudgetOperation.newBuilder().setCreate(budget).build(); CampaignBudgetServiceClient campaignBudgetServiceClient = googleClient.createCampaignBudgetServiceClient(); MutateCampaignBudgetsResponse budgetResponse = campaignBudgetServiceClient.mutateCampaignBudgets(customerId, ImmutableList.of(budgetOp)); String budgetResourceName = budgetResponse.getResults(0).getResourceName(); List<CampaignOperation> operations = new ArrayList<>(1); Campaign googleCampaign = Campaign.newBuilder().setName(titanCampaign.getName()) .setAdvertisingChannelType(AdvertisingChannelType.MULTI_CHANNEL) .setAdvertisingChannelSubType(AdvertisingChannelSubType.APP_CAMPAIGN) .setStatus(CampaignStatus.PAUSED) .setCampaignBudget(budgetResourceName) .build(); CampaignOperation campaignOp = CampaignOperation.newBuilder().setCreate(googleCampaign).build(); operations.add(campaignOp); CampaignServiceClient campaignServiceClient = googleClient.createCampaignServiceClient(); MutateCampaignsResponse campaignResponse = campaignServiceClient.mutateCampaigns(customerId, operations); On Wed, Feb 17, 2021 at 9:10 AM Google Ads API Forum Advisor Prod < adsapiforumadvi...@gmail.com> wrote: > Hi Gregory, > > Can you please confirm that you are using the AdWords API? The error you > mentioned occurs if the campaign is an experiment > <https://developers.google.com/adwords/api/docs/guides/budgets#common_errors>. > Can you also confirm if this is the case? > > Thanks, > Matt > Google Ads API Team > > [image: Google Logo] > Matt > Google Ads API Team > > > ref:_00D1U1174p._5004Q2CRs7q: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/CAJxDUeWcru6VKpESoNmpNdmaVX-ALzwj%3Di_gnOXvvyGp1GF5TA%40mail.gmail.com.