How to download ResponsiveDisplayAds Images

36 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Steven Horvat

ungelesen,
09.01.2019, 10:37:0309.01.19
an AdWords API and Google Ads API Forum
I'm setting up functionality to allow us to copy ResponsiveDisplayAds and MultiAssetResponsiveDisplayAds across accounts. I realize I basically need to pull all the information out of the ads and create new ones in my destination adGroup. For downloading all the images (

marketingImage(s)squareMarketingImage(s), etc) whats the recommended way to go about that? Should I be trying to download from the image URL, or is there a way to get the image data directly?


I tried to get the image data from the adGroupAdService selection I used for all the other Ad Fields, but I'm getting NULL.
$marketing_image_data = $adGroupAd->getAd()->getMarketingImage()->getData();


 

 


Bharani Cherukuri (AdWords API Team)

ungelesen,
09.01.2019, 17:37:2409.01.19
an AdWords API and Google Ads API Forum
Hello Steven, 

You may use the AssetService.get() which will return all the image assets. You will be able to filter this based on the AssetId. You may refer to the GetAllImageAssets PHP code sample as a reference. Let me know if you have any other questions. 

Regards,
Bharani, AdWords API Team

Steven Horvat

ungelesen,
10.01.2019, 10:32:2410.01.19
an AdWords API and Google Ads API Forum
How do I get the AssetId from the MarketingImage? I can get mediaId from the MarketingImage, but I don't see where I'd get an AssetId to search.

Bharani Cherukuri (AdWords API Team)

ungelesen,
10.01.2019, 17:28:0110.01.19
an AdWords API and Google Ads API Forum
Hello Steven, 

The MediaId will be the assetId for the image asset. You may refer to the GetAllImageAssets PHP code sample as a reference. Let me know if you have any other questions. 
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten