Discovery Carousel Ad creation via REST API fails

229 views
Skip to first unread message

Adam Nagy

unread,
May 12, 2022, 8:58:33 AM5/12/22
to Google Ads API and AdWords API Forum
Greetings Google Ads API Technical Support Team,

I'm trying to create Discovery Carousel Ads via the REST API.

I have created multiple image assets via the API already. The images I'm trying to use are all 1200 px * 1200 px.

There are 2 questions from my side:
  • does the extension of the image matter at all? It's uploaded with a base64 string, I'm using both pang and jpg as extensions
  • Why does the API call fail? Please check below the request and the response.
    • In short basically it says that the asset's type is not compatible with the field's type. "The given asset's type and the specified field type are incompatible."
Thanks!
Adam


API Request
{
    "mutateOperations": [
        {
            "adGroupAdOperation": {
                "create": {
                    "adGroup": "customers/5810957480/adGroups/137501321958",
                    "status": "PAUSED",
                    "ad": {
                        "discoveryCarouselAd": {
                            "businessName": "Smartly.io API",
                            "headline": {
                                "text": "headline API"
                            },
                            "description": {
                                "text": "description API"
                            },
                            "logoImage": {
                                "asset": "customers/5810957480/assets/39292148799"
                            },
                            "carouselCards": [
                                {
                                    "asset": "customers/5810957480/assets/39292888195"
                                },
                                {
                                    "asset": "customers/5810957480/assets/39292148799"
                                }
                            ]
                        },
                        "finalUrls": [
                            "https://www.smartly.io/api"
                        ]
                    }
                }
            }
        }
    ]
}

API RESPONSE
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "assetLinkError": "FIELD_TYPE_INCOMPATIBLE_WITH_ASSET_TYPE"
                        },
                        "message": "The given asset's type and the specified field type are incompatible.",
                        "trigger": {
                            "int64Value": "39292888195"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "mutate_operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "ad_group_ad_operation"
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "ad"
                                },
                                {
                                    "fieldName": "discovery_carousel_ad"
                                },
                                {
                                    "fieldName": "carousel_cards",
                                    "index": 0
                                },
                                {
                                    "fieldName": "asset"
                                }
                            ]
                        }
                    },
                    {
                        "errorCode": {
                            "assetLinkError": "FIELD_TYPE_INCOMPATIBLE_WITH_ASSET_TYPE"
                        },
                        "message": "The given asset's type and the specified field type are incompatible.",
                        "trigger": {
                            "int64Value": "39292148799"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "mutate_operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "ad_group_ad_operation"
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "ad"
                                },
                                {
                                    "fieldName": "discovery_carousel_ad"
                                },
                                {
                                    "fieldName": "carousel_cards",
                                    "index": 1
                                },
                                {
                                    "fieldName": "asset"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "oheKC29aXwfDbcDDqfvCjg"
            }
        ]
    }
}

Adam Nagy

unread,
May 12, 2022, 9:34:51 AM5/12/22
to Google Ads API and AdWords API Forum
ps one more thing, if I try to create the ad via the UI, it works perfectly fine

Google Ads API Forum Advisor

unread,
May 16, 2022, 5:15:41 AM5/16/22
to adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API team.

Moving forward to your concerns, so our team can investigate and provide guidance accordingly, could you provide the complete request and response logs with request ID and request header 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
Carmela
Google Ads API Team
 


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