I found on the web only a single example of using *MobileImageAd *(duplicated 
in several places).
The latest version of this example on the web seems to be from 2011  (e.g. 
https://searchcode.com/codesearch/view/2598566/)

i'm trying to adapt it to version='v201402'   (yes, i know it's deprecated 
since last week, I assume the problems are the same)


Here's my current code:

image = {
  'dimensions': [{
    'key': 'FULL',
    'value': {'width': width, 'height': height }
  }],
  'name': 'sample.jpg',
  'data': base64.encodestring( Utils.ReadFile(image_file) )
}
operations = [{
  'operator': 'ADD',
  'operand': {
    'xsi_type': 'AdGroupAd',
    'adGroupId': adgroup_id,
    'ad': {
      'xsi_type': 'MobileImageAd',
      'markupLanguages': ['HTML'],                          # why do I need 
it anyway?
      'mobileCarriers': ['T-Mobile@US', 'Verizon@US'],
      'image': image,
      'url': destination_url,
      'displayUrl': display_url
    }
  }
}]





first problem:
"ImageError.FILE_TOO_LARGE"    -- why? it's only 8k  (attached). 


2nd problem: carriers:
AdError.INVALID_MOBILE_CARRIER_TARGET @ 
operations[0].operand.ad.mobileCarriers
According to the docs, they should be accepted.  This was also the syntax 
for the 2011 api-version.  Why not?
https://developers.google.com/adwords/api/docs/appendix/mobilecarriers  
For now I ended up using "ALLCARRIERS".  But I'd like to target carriers, 
too

3rd problem:
AdError.INVALID_AD_ADDRESS_CAMPAIGN_TARGET
(according to the docs it has nothing to do with "url" and "display_url", 
which i won't disclose here, but are perfectly valid URLs in my case) 
I do not understand this error
https://developers.google.com/adwords/api/docs/reference/v201406/AdGroupAdService?hl=es
"INVALID_AD_ADDRESS_CAMPAIGN_TARGET    User cannot create mobile ad for 
countries targeted in specified campaign."

thank you

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/f7bf8910-7521-408d-8926-f6bbceef9986%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to