MediaError.INVALID_MEDIA_ID error occured when GmailAd try to create

30 views
Skip to first unread message

hüseyin Armağan

unread,
Jan 3, 2020, 4:30:22 AM1/3/20
to AdWords API and Google Ads API Forum
Hi,
I try to create gmaid ad but Adowords does not allow it and throw exception which is INVALID MEDIA ID. I can not figure out even if I tried different size of uploaded image files.

I check the size of media and it is at the below ;

logoImage.mediaId: logoImage.mediaId : 512 X 512
marketingImage.mediaId : 600 X 315


ERROR : 
'faultMessage': '[MediaError.INVALID_MEDIA_ID @ operations[0].operand.ad.teaser.logoImage.mediaId, MediaError.INVALID_MEDIA_ID @ operations[0].operand.ad.marketingImage.mediaId]', 'requestId': '00059b38d1c165530a374b914b0c9b50', 'serviceName': 'AdGroupAdService', 'methodName': 'mutate', 'operations': '1', 'responseTime': '341'}

One of the Image Upload result : 

{
    "mediaId"33184227357,
    "type""IMAGE",
    "referenceId"4090239237876613120,
    "dimensions": [
        {
            "key""FULL",
            "value": {
                "width"600,
                "height"315
            }
        }
    ],
    "urls": [
        {
            "key""FULL",
        }
    ],
    "mimeType""IMAGE_PNG",
    "sourceUrl"null,
    "name"null,
    "fileSize"111054,
    "creationTime"null,
    "Media.Type""Image",
    "data"null
}

Regards,

Hüseyin.

Google Ads API Forum Advisor Prod

unread,
Jan 3, 2020, 3:54:22 PM1/3/20
to huseyin...@gmail.com, adwor...@googlegroups.com

Hello,

Thank you for writing to us. I understand you are trying to create Gmail ads via API, could you please verify if you meet the requirements and Google policies as mentioned in this article while creating Gmail ads? Also, please refer to this code sample in JAVA (code samples in other languages can be found here) to create Gmail Ads with images via AdWords API. If the issue persists, could you please share the complete request and response logs along with the client customer id for me to investigate this further on my end and assist you better?

P.S. Please use Reply privately to author option while sharing the details for investigation.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UOFkkD:ref
Reply all
Reply to author
Forward
0 new messages