ASPECT_RATIO_NOT_ALLOWED

221 views
Skip to first unread message

RANANJAYPRATAP SINGH

unread,
Feb 23, 2022, 10:20:43 AM2/23/22
to Google Ads API and AdWords API Forum

Hi

Our google adword api for campaign creation and was running fine yet but now we are getting below error with every ad creation.

[ImageError.UNEXPECTED_SIZE @ operations[0].operand.ad.marketingImages[0].asset.assetId, ImageError.ASPECT_RATIO_NOT_ALLOWED @ operations[0].operand.ad.marketingImages[0].asset.assetId]   (Detail can be get from attachment).

 

Please note our images are meeting required specifications and was uploading successfully till few days back.

Version Google adwords - 4.2. (v201809)

Your help/advice is needed for resolution , Thanks In advance.

google_campaign api error.txt

Google Ads API Forum Advisor

unread,
Feb 23, 2022, 9:35:08 PM2/23/22
to rananjayp...@gmail.com, adwor...@googlegroups.com
Hi Rananjaypratap,

Thank you for reaching out to our team.

Before proceeding to the issue, I would like to inform you first that the AdWords API is deprecated and will be sunset on April 27, 2022. We strongly recommend that you migrate to the Google Ads API as soon as possible. 

Moving forward, so that I can investigate the issue, could you provide also the SOAP request generated on your end? You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WyMzm:ref

RANANJAYPRATAP SINGH

unread,
Feb 27, 2022, 5:30:49 PM2/27/22
to Google Ads API and AdWords API Forum
Hi
Any update , please do needful

Google Ads API Forum Advisor

unread,
Feb 28, 2022, 2:09:10 AM2/28/22
to rananjayp...@gmail.com, adwor...@googlegroups.com

Hi Rananjaypratap,

Thank you for your response.

Can you confirm if you receive the response from my colleague Matt? If not yet, I would suggest to check your spam. I've also included it here for your reference.

" Can you please provide the ImageDimensionInfo for the asset, 24161195706, so we can check that it is fitting the marketingImage specification? The minimum size is 600x314 and the aspect ratio must be 600:314 (+-1%)."

As a side note, if you're having trouble receiving private replies from us, please check your Spam folder. Additionally, please add the 'From address' on that email to your contact list to ensure we aren't flagged as Spam in future messages. If you don't see a message from us in your Spam folder, please email us directly at googleadsa...@google.com referring to this forum thread.

Regards,

Google Logo
Princess Pamela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WyMzm:ref

RANANJAYPRATAP SINGH

unread,
Feb 28, 2022, 3:10:13 PM2/28/22
to Google Ads API and AdWords API Forum
Hi
Thanks for your reply , yes I got your response in spam so I missed it.
meanwhile with I have tried image with dimension 1200*628 px and succeed in creating campaign. I also agreed to dimension which you have proposed. 
I have images with dimensions (600*314 px , 250*250 px etc , for privacy issue I can not attach them.)
Note: - we have edited them by paint app.

Now I have few questions .
1. Your site (https://support.google.com/google-ads/answer/1722096?hl=en#zippy=%2Canimated-and-non-animated-image-ads) proposed variety of dimension which actually many of them giving ASPECT_RATIO_NOT_ALLOWED exception. Please share if you have any other list.

2. I am getting CANNOT_MODIFY_ASSET_NAME in few asset so I parse error message and getting already available asset Id , is there any other way to get it( as if your error message change our parser will have no use).

BR
Rananjay

Now I have few question ,   

Google Ads API Forum Advisor

unread,
Mar 1, 2022, 3:35:09 PM3/1/22
to rananjayp...@gmail.com, adwor...@googlegroups.com
Hi Rananjay,

Glad to hear that the documented image size was successful. 

The list you provided is a general Ads document that associates image dimensions with names. The marketingImage that you provided has its own requirement, which is 600:314 (+-1%). You can find the requirements for various image types on this page.

Can you please clarify your second request? I understand you are receiving the error, CANNOT_MODIFY_ASSET_NAME. You asked "is there any other way to get it" -- can you clarify what exactly you are referring to here?

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WyMzm:ref

RANANJAYPRATAP SINGH

unread,
Mar 2, 2022, 6:38:53 AM3/2/22
to Google Ads API and AdWords API Forum
Hi Thanks for response ,
In my second request , If I upload any image and if that image already uploaded previously with some other ad or adgroup then I am getting API  CANNOT_MODIFY_ASSET_NAME Exception and below error message .
There is an existing asset that represents the same content as the asset to be added, but with a different name: the input asset has name 'ADWORDS_API image asset'; and the existing asset has name 'ADWORDS_API image asset_2022-02-XX_17-51-30' and ID 2416XXXX. Remove the existing asset first if you would like to change the name of the asset.

In this case I use the Asset Id returned in error message "2416XXXX"  then my ad creation getting success so basically I have to use this ID so currently I parse above error message to extract ID from it , is there any API method by which I can query already uploaded asset and get ID.

Otherwise your proposed image resolution working fine for us.

BR
Rananjay

Google Ads API Forum Advisor

unread,
Mar 3, 2022, 3:57:11 AM3/3/22
to rananjayp...@gmail.com, adwor...@googlegroups.com
Hi Rananjay,

Thanks for getting back to us.

With regard to your concern "is there any API method by which I can query already uploaded asset and get ID.", as you've mentioned. With this, you may use the asset reports in Google Ads API by asset name in Adwords API. However, I suggest these fields for asset name and get id from asset id.

Let me know if you have any questions on the provided documents.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2WyMzm:ref

RANANJAYPRATAP SINGH

unread,
Mar 3, 2022, 12:36:35 PM3/3/22
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Thanks for all your support 
Please mark this conversation resolved and completed.

BR
Rananjay
Reply all
Reply to author
Forward
0 new messages