RE: Adding an Image Asset for creating Ad

2019-05-28 Thread Google Ads API Forum Advisor Prod
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
ref:_00D1U1174p._5001UAqinC:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ZQHJm0PS82U300fzMob8EeQIypKOFZVuKWNA%40sfdc.net.
For more options, visit https://groups.google.com/d/optout.


Re: Adding an Image Asset for creating Ad

2019-05-26 Thread revarasi Sofa
service korsi sopa dibandug

Pada tanggal Sen, 27 Mei 2019 11.59, revarasi Sofa <
service.kursi...@gmail.com> menulis:

> service korsi sopa bandung
>
> Pada tanggal Sen, 27 Mei 2019 11.56, Anushri shanbhag <
> anushriar...@gmail.com> menulis:
>
>> I need to create an ad and I need to upload an image asset so I can use
>> it with Ad.
>>
>> I  am using *Google Ads API .  *I believe I need to use the
>> *"AssetService" *
>> https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.AssetService
>>  for
>> the same.
>>
>>
>> ad_imageasset_service  = client.get_service('*AssetService*', version='v1')
>>
>> ad_imageadd_operation  = client.get_type('AssetOperation', version='v1')
>>
>> ad_imageadd= ad_imageadd_operation.create
>>
>>
>> I 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 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 and Google Ads 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 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.
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAHekckBdt4N%3D_e7JSs%3Dgs477sjF14dm_iJqTqCbYO7G%2B2Lj9nQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding an Image Asset for creating Ad

2019-05-26 Thread revarasi Sofa
service korsi sopa bandung

Pada tanggal Sen, 27 Mei 2019 11.56, Anushri shanbhag <
anushriar...@gmail.com> menulis:

> I need to create an ad and I need to upload an image asset so I can use it
> with Ad.
>
> I  am using *Google Ads API .  *I believe I need to use the
> *"AssetService" *
> https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.AssetService
>  for
> the same.
>
>
> ad_imageasset_service  = client.get_service('*AssetService*', version='v1')
>
> ad_imageadd_operation  = client.get_type('AssetOperation', version='v1')
>
> ad_imageadd= ad_imageadd_operation.create
>
>
> I 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 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 and Google Ads 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 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.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAHekckBRFAO-r2XMqz9_ufMAiCLdP55uca2ys2Z_OK6u0ejBrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Adding an Image Asset for creating Ad

2019-05-26 Thread Anushri shanbhag
I need to create an ad and I need to upload an image asset so I can use it 
with Ad. 

I  am using *Google Ads API .  *I believe I need to use the 
*"AssetService" *
https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.AssetService
 for 
the same.
 

ad_imageasset_service  = client.get_service('*AssetService*', version='v1')

ad_imageadd_operation  = client.get_type('AssetOperation', version='v1')

ad_imageadd= ad_imageadd_operation.create 


I 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 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 and Google Ads 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 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.