ad_imageasset_service = client.get_service('AssetService', version='v1')
ad_imageadd_operation = client.get_type('AssetOperation', version='v1')ad_imageadd = ad_imageadd_operation.createI am now trying to add the image. I have the image and it's details. But I see that we need to input the image data in bytes .Could you please validate if above is right ? Also considering we have the image, how should we input the image data in bytes ?Thanks and Regards,Anushri
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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...@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...@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/064c8ef0-f993-43a6-9e45-0b5b5d316399%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Anushri,
Here's an example from the Python client library where we add an image using the MediaFileService. The same operation via AssetService should be quite similar, a rough example is below:
asset_operation = client.get_type('AssetOperation', version='v1')
asset = asset_operation.create
asset.image_asset.data.value = image_bytes
Here image_bytes is the raw image data. In the example I linked we retrieve it by requesting the data from a URL here, but you could also read that data from a file.
Hope that helps!
Best,
Ben Karl, Google Ads API Team