To make it clear, I want to create a CallOnlyAd object. Here is my sample code for reference (Python)
# Create the ad group ad. ad_group_ad_operation = client.get_type("AdGroupAdOperation", version="v5") ad_group_ad = ad_group_ad_operation.create ad_group_ad.status = client.get_type("AdGroupAdStatusEnum", version="v5").PAUSED ad_group_ad.ad_group = ad_group_service.ad_group_path(customer_id, row['Ad group ID']) # Set call ad info. ad_group_ad.ad.final_urls.append(url_to_use) #Commenting out this line causes the ad to be added with no issue. ad_group_ad.ad.call_only_ad.country_code = "US" ad_group_ad.ad.display_url = url_to_use ad_group_ad.ad.call_only_ad.headline1 = h1 ad_group_ad.ad.call_only_ad.headline2 = h2 ad_group_ad.ad.call_only_ad.description1 = d1 ad_group_ad.ad.call_only_ad.description2 = d2 #ad_group_ad.ad.expanded_text_ad.path1 = path1 ad_group_ad.ad.call_only_ad.call_tracked = True ad_group_ad.ad.call_only_ad.phone_number = phone_number ad_group_ad.ad.call_only_ad.business_name = business print(ad_group_ad) adgroup_operations.append(ad_group_ad_operation) ... ... try: ad_group_ad_response = ad_group_ad_service.mutate_ad_group_ads( customer_id, adgroup_operations ) except GoogleAdsException as ex: print( f'Request with ID "{ex.request_id}" failed with status ' f'"{ex.error.code().name}" and includes the following errors:' ) for error in ex.failure.errors: print(f'\tError with message "{error.message}".') if error.location: for field_path_element in error.location.field_path_elements: print(f"\t\tOn field: {field_path_element.field_name}") sys.exit(1) On Thursday, October 15, 2020 at 4:24:47 AM UTC+1 adsapiforumadvisor wrote: > Hi Seán, > > Thanks for posting your concern. > > With regard to the first item, could you clarify what type of ads you want > to create and provide the code that you've used upon encountering the error? > > Moving forward on setting path1 or path2 of the display URL for call only > ads, I am afraid that this is not possible as according to this product > level guide <https://support.google.com/google-ads/answer/7046795?hl=en>, > path1 > and path2 fields are part of the display URL of expanded text ads only. > With this, these fields are also not possible to set in call only ads > <https://developers.google.com/google-ads/api/reference/rpc/v5/CallOnlyAdInfo> > > using Google Ads API. > > Regards, > [image: Google Logo] > Ernie John Blanca Tacata > Google Ads API Team > > > ref:_00D1U1174p._5004Q269FuF: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/3b848c45-1377-44dc-b2cb-2f4a33162911n%40googlegroups.com.