Actually i have changed the field names as per told but still i'm not able to create a campaign, and I don't know the proper format for how to make an AD inside of that. My code and the error which i am facing is down below.
*ERROR* googleads.errors.GoogleAdsServerFault: Unmarshalling Error: cvc-elt.4.3: Type 'ns0:UniversalAppCampaignInfo' is not validly derived from the type definition, 'Setting', of element 'ns0:settings'. *CODE* campaign_service = client.GetService('CampaignService', version='v201809') budget_id = CreateBudget(client) # Create the Universal App campaign. universal_app_campaign = { 'name': 'Cruise App #%s' % uuid.uuid4(), 'status': 'PAUSED', 'advertisingChannelType': 'MULTI_CHANNEL', 'advertisingChannelSubType': 'UNIVERSAL_APP_CAMPAIGN', # Set the campaign's bidding strategy. Universal app campaigns only # support TARGET_CPA bidding strategy. 'biddingStrategyConfiguration': { # Set the target CPA to $1 / app install. 'biddingScheme': { 'xsi_type': 'TargetCpaBiddingScheme', 'targetCpa': { 'microAmount': '1000000' } }, 'biddingStrategyType': 'TARGET_CPA' }, # Note that only the budgetId is required 'budget': { 'budgetId': budget_id }, # Optional fields 'startDate': (datetime.datetime.now() + datetime.timedelta(1)).strftime('%Y%m%d'), 'endDate': (datetime.datetime.now() + datetime.timedelta(365)).strftime('%Y%m%d'), } universal_app_campaign['settings'] = [ # Set the campaign's assets and ad text ideas. These values will # be used to generate ads. { 'xsi_type': 'UniversalAppCampaignInfo', 'appId': 'com.app' 'appVendor': 'VENDOR_GOOGLE_MARKET', } ] # Construct operations and add campaigns. operations = [{ 'operator': 'ADD', 'operand': universal_app_campaign }] campaigns = campaign_service.mutate(operations)['value'] On Thursday, August 8, 2019 at 2:58:37 PM UTC+5, adsapiforumadvisor wrote: > > Hi Imran, > > Unfortunately, we don't have the exact sample code that you are looking > for. You may specify the UniversalAppCampaignInfo > <https://developers.google.com/adwords/api/docs/reference/v201809/CampaignService.UniversalAppCampaignInfo> > in > your API call instead of UniversalAppCampaignSetting. > > If you are encountering any issues while you update your code, I would > suggest that you reach out to the owners > <https://github.com/googleads/googleads-python-lib/issues> of the client > library as they are more equipped to answer to your questions. > > Regards, > Hiroyuki > Google Ads API Team > > > ref:_00D1U1174p._5001UEIDGf: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/d2a844d5-d3b9-407d-8be0-72b82a458023%40googlegroups.com.