Hi Vince,

I think that what's happening here is that the SOAP toolkit is performing 
the base64 encoding for you, so if you base64 encode the value as well, 
you're double-encoding and that leads to the error.

For example, in the Java client library, the type of the Image.data field 
<https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.Image#data>
 is 
simply byte[] 
<https://github.com/googleads/googleads-java-lib/blob/master/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201502/cm/Image.java#L57>,
 
so when creating an *Image* object I can simply set that field to the raw 
byte array. However, when the underlying SOAP toolkit (e.g., Apache Axis) 
builds the message, it base64 encodes those bytes.

Cheers,
Josh, AdWords API Team

On Tuesday, June 23, 2015 at 11:24:18 PM UTC-4, Vince NexonM wrote:
>
> Following the image documentation
>
>
> https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupAdService.Image
>
> It's stated that the raw data image should be base 64 byte array, but I 
> kept getting an invalid image error.
>
> I then decided to try the regular byte array, non base 64 format, and it 
> accepted and I can see my image ad in my campaign now. Is that a typo in 
> the documentation or am I reading it wrong?
>
>
> Vince
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/288c60be-e608-42be-854e-63cdd172c8a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to