Hello, thanks for your reply, the code actually tries to update an adgroup not adding a new one. I read on the API documentation that in the updateAdGroup() call, if you omit one parameter, it will maintain the original value:
http://code.google.com/apis/adwords/docs/developer/AdGroupService.html#updateAdGroup I'm only setting the id, and the keywordcontentmaxcpc, that's what I want, but Google returns that error which I don't completely understand, I'm not sure if something I'm doing wrong or some real bug on Google Adwords API. I found an example here: http://google-api-adwords-java.googlecode.com/svn/trunk/examples/ApiExceptionDemo.java // Create an ad group AdGroup myAdGroup = new AdGroup(); myAdGroup.setName("dev guide"); myAdGroup.setKeywordContentMaxCpc(new Long(50000)); That's for adding an adgroup (not updating like I want), but it only sets the keyword content cpc, and not the other (the keyword cpc), which according to the API docs: http://code.google.com/apis/adwords/docs/developer/AdGroup.html if we set keywordContentMaxCpc we are overriding keywordMaxCpc, so I'm afraid that setting keywordMaxCpc too is not what I really meant to do. I searched the web for that error and I found only one message that doesn't explain the problem), so I think this is important, since a solution to this will help everybody who had this problem. Sorry if I'm stubborn on this, but I think there's something wrong with that message. Regards, Xavier On Feb 23, 2:15 pm, AdWords API Advisor <adwordsapiadvi...@google.com> wrote: > Hello Xavier, > > Backing up a bit, based on the snippet of code you provided, I don't > think you're going about things the right way. > > The snippet suggests you're trying to create a new ad group. If > that's the case, you should not set the id of the ad group (because > you don't know it in advance) and you shouldn't make a call to > updateAdGroup(). Instead, you should populate all the relevant fields > of the new ad group and then make a call to addAdGroup(). If you're > setting the keywordContentMaxCpc option on the ad group then you > should also set the keywordMaxCpc attribute as well--I think that > might be the source of your error. But regardless of that, you need to > make changes to your code to create an ad group with the proper API > calls. > > Cheers, > -Jeff Posnick, AdWords API Team > > On Feb 22, 12:01 am, Xavier <javier1...@hotmail.com> wrote: > > > I have this java code: > > > AdGroup newAdgroup = new AdGroup(); > > newAdgroup.setId(THE_ID_VALUE); > > newAdgroup.setKeywordContentMaxCpc(THE_CONTENT_BID); > > > And when I call updateAdGroup(newAdgroup), I got this error: > > > "Separate content keyword bids is only applicable in campaigns with > > keyword cpc bids" > > > I'm not sure what's wrong, does it has something to do with the v13 > > API? any help is welcome. > > > Here's a more complete error, although I think it won't add much: > > > AxisFault > > faultCode: {http://schemas.xmlsoap.org/soap/envelope/} > > Server.userException > > faultSubcode: > > faultString: One or more input elements failed validation. > > faultActor: > > faultNode: > > faultDetail: > > {https://adwords.google.com/api/adwords/v13}fault: > > <ns1:code>122</ns1:code> > > > <ns1:message>One or more input elements failed validation.</ > > ns1:message> > > > <ns1:errors> > > <ns1:index>0</ns1:index> > > > <ns1:code>177</ns1:code> > > > <ns1:isExemptable>false</ns1:isExemptable> > > > <ns1:detail>Separate content keyword bids is only applicable > > in campaigns with keyword cpc bids.</ns1:detail> > > > </ns1:errors> > > > Regards, > > > Xavier --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AdWords 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 -~----------~----~----~----~------~----~------~--~---