Migrating from ResponsiveDisplayAd to MultiAssetResponsiveDisplayAd

25 views
Skip to first unread message

Panu Kuuluvainen

unread,
Jun 12, 2019, 5:24:19 PM6/12/19
to AdWords API and Google Ads API Forum
MultiAssetResponsiveDisplayAd does not like my images.

responsive_search_ad = {
'xsi_type': 'AdGroupAd',
'adGroupId': ad_group_id,
'ad': {
'xsi_type': 'MultiAssetResponsiveDisplayAd',
'finalUrls': [final_url],
'headlines': [shortHeadline],
'longHeadline' : longHeadline,
'marketingImages' : [marketing_image],
'logoImages' : [logo_image],
'descriptions' : [description],
'businessName' : businessName,
},
# Optional fields.
'status': status
}


Returns: GoogleAdsServerFault: Unmarshalling Error: cvc-elt.4.3: Type 'ns0:Image' is not validly derived from the type definition, 'AssetLink', of element 'ns0:marketingImages'. 

I used the media service to create an image. Now it appears I should use Asset Link. 

Something like 

asset_link = {'ImageAsset': {'imageData' : marketing_image}}
ad_group_ads = ad_group_ad_service.mutate({ 'operator': 'ADD', 'operand': asset_link})

Does anyone happen to have an example of how this works?

Google Ads API Forum Advisor Prod

unread,
Jun 13, 2019, 3:10:50 PM6/13/19
to panu.kuu...@hopkins.fi, adwor...@googlegroups.com
Hi Panu, 

You may refer to this code example for creating the MultiAssetResponsiveDisplayAd in Python. Could you please give this a try and let us know if you are facing any issues?

Thanks,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UBmzRw:ref
Reply all
Reply to author
Forward
0 new messages