Thanks Nadine for your time in testing and getting back to me. (Un?)fortunatly, we are using only *template ads* for our customers, and even with selecting only the Id of AdGroupAds, I don't get the urls. Maybe you can give it a try with a template Ad, but I don't see any Image coming AFAICS.
Cheers David Le vendredi 5 juin 2015 16:38:37 UTC+2, Nadine Sundquist (AdWords API Team) a écrit : > > Hello David, > > I decided to give this a try in a test account to verify that I could > somehow get an image back through the API, whether it be an image or a URL > to an image. Here's what I did to get back a URL of my ad's image. > > - I created an Image Ad in my account. In my case I uploaded an image > that was 250x360. > - Using the AdGroupAdService > > <https://developers.google.com/adwords/api/docs/reference/latest/AdGroupAdService>, > > I created a selector with only the *Id*. Some fields will come back > without explicitly selecting them. > - For each AdGroupAd > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.AdGroupAd>, > > I retrieved the ad > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.AdGroupAd#ad>, > > which resulted in getting back an ImageAd > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.ImageAd> > . > - In the ImageAd > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.ImageAd>, > > I retrieved the image > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.Image> > . > - In the Image > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.Image>, > > I retrieved the urls > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.Image#urls>, > > which is a mapping of key value pairs. Some examples of the keys are > *PREVIEW* and *FULL.* > - Here's an example of the XML output from *urls* (with details > starred out): > > <key>FULL</key><value> > https://tpc.googlesyndication.com/pageadimg/imgad?id=C***Q</value>, > > <key>PREVIEW</key><value> > https://tpc.googlesyndication.com/pageadimg/imgad?id=C***s</value> > > > - The dimensions > > <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.Image#dimensions> > in > an ImageAd give the size of the ad in the *urls *field. > > <key>PREVIEW</key><value><width>60</width><height>86</height></value>, > > <key>FULL</key><value><width>250</width><height>360</height></value> > > > Best, > Nadine, AdWords API Team > > On Friday, June 5, 2015 at 6:09:22 AM UTC-4, David B. wrote: >> >> Hi Nadine, >> >> Thanks for your answer. But the Field adAsImage doesn't seems to be >> Selectable ( >> https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201502-AdGroupAdService). >> >> Or am I missing something ? >> >> Ideally, I'm looking to get the urls of the ads in this page (example) : >> >> >> https://adwords-displayads.googleusercontent.com/da/b/dabAdPreview?templateId=311&outputFormat=FLASH&width=300&height=250&visibleUrl=www.boutiquevignoblesdelarose.fr/&destinationUrl=http://www.boutiquevignoblesdelarose.fr/&isExpandable=false&irsKey=1170683329846968320&hl=fr&ad=63850277414&adGroup=17297669054&ocid=8948014046&s=14&showMulPreview=true&deviceType=0&isInApp=false&sig=ACiVB_xHtTy2iehejwfjezI2eRVsct6xGw >> >> Cheers, >> >> David >> >> Le jeudi 4 juin 2015 23:17:52 UTC+2, Nadine Sundquist (AdWords API Team) >> a écrit : >>> >>> Hi David, >>> >>> The adsAsImage >>> <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.TemplateAd#adAsImage> >>> field >>> is the correct location when looking for the image. Another place you can >>> look is in the templateElements >>> <https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.TemplateAd#templateElements> >>> field. >>> If you're running an image ad, then check out the Image section >>> <https://developers.google.com/adwords/api/docs/appendix/templateads#gmail_image_ad_partial_slot_V1> >>> of >>> the Template Ads reference page >>> <https://developers.google.com/adwords/api/docs/appendix/templateads>. >>> >>> Best, >>> Nadine, AdWords API Team >>> >>> On Tuesday, June 2, 2015 at 9:34:32 AM UTC-4, David B. wrote: >>>> >>>> Hi All, >>>> >>>> For Template Ads, is it possible to get the preview urls for each >>>> dimension just like the ones you get in the AdWords UI ? I'm looking at >>>> the >>>> TemplateAd.adAsImage but I'm not sure that's the right field (as it's >>>> always a null value...). And nothing is really clear about this field. >>>> >>>> Thanks for your help, >>>> >>>> Cheers. >>>> >>>> - DB. >>>> >>>> >>>> >>>> >>>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/074c5ab0-000c-442c-a805-ece83ee6fed5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.