Why the MediaFile resource of image_ad is not selectable in GAds API?

41 views
Skip to first unread message

javoeria

unread,
Feb 7, 2019, 7:56:31 AM2/7/19
to AdWords API and Google Ads API Forum
I can't get the MediaFile resource name of an image_ad but i can get the MediaFile resource name of a video_ad.
I don't understand the reason of this, why is it different?
Thanks

googleadsapi...@google.com

unread,
Feb 7, 2019, 1:40:53 PM2/7/19
to AdWords API and Google Ads API Forum
Hello,

You could use the ad_group_ad.resource_name and ad_group_ad.ad.type fields to find the resource name and type of the Ads from your account. You could use the below query to get the information required. 

.setQuery("SELECT ad_group_ad.resource_name, ad_group_ad.ad.type FROM ad_group_ad ORDER BY ad_group_ad.ad.type")

In-case you are looking to get the resource name of the images then you can use the media_file.resource_name and media_file.type fields of the media_file resource. Below is the query for your reference. 

.setQuery("SELECT media_file.resource_name, media_file.type FROM media_file ORDER BY media_file.type")

If you are still not seeing any resource names for Image Ads/Images? could you please share the query you are running and the account CID you are pointing to? You could share the requested information via the reply privately to the author option.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/f9321edc-e792-4bbf-af1d-fadac1597e68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages