Unable to create app ads - Err = VALUE_MUST_BE_UNSET

55 views
Skip to first unread message

Darshan Dhabale

unread,
Aug 16, 2024, 9:48:28 PM8/16/24
to Google Ads API and AdWords API Forum
Hi Google Ads team,
I have been trying to create an app ad for a while, I tried multiple combinations of campaign and adgroups but it still throws me an error that is not very descriptive
Here is the curl I used
curl --location 'https://googleads.googleapis.com/v16/customers/5023695848/adGroupAds:mutate' \
--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id: 1777769554' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ya29.a0AcM612zZpc4ZDZywRcpjhGED3yo1pfqnTnZkpY9QJU7akIScQIjnDZnZdrzNekgEUU9lTdSYdilKmw7b6UXonX-GHEUeiyHT1qSAhcC3DMu7LQlKLsVKm18Kgu0BTNJwPk4mSBIkOxHBw12Jya8vB0wejO-9XrleO4S_WevLaCgYKAdcSARMSFQHGX2MijKQaPtwz2-qT-342G1APYA0175' \
--data '{
    "operations": [
        {
            "create": {
                "adGroup": "customers/5023695848/adGroups/164816049766",
                "ad": {
                    "appAd": {
                        "mandatoryAdText": {
                            "text": "This is mandatory ad text."
                        },
                        "headlines": [
                            {
                                "text": "Catchy Headline 1"
                            },
                            {
                                "text": "Catchy Headline 2"
                            }
                        ],
                        "descriptions": [
                            {
                                "text": "This is a detailed description of the ad."
                            },
                            {
                                "text": "Another engaging ad description."
                            }
                        ],
                        "images": [
                            {
                                "asset": "customers/5023695848/assets/162895278109"
                            }
                        ]
                    }
                }
            }
        }
    ],
    "responseContentType": "MUTABLE_RESOURCE"
}'

and here is the error
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v16.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "fieldError": "VALUE_MUST_BE_UNSET"
                        },
                        "message": "The field cannot be set.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "ad"
                                },
                                {
                                    "fieldName": "app_ad"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "OuPGzbr6HTV4atWnY1fVlw"
            }
        ]
    }
}

Thanks a lot for your time and help

Google Ads API Forum Advisor

unread,
Aug 19, 2024, 7:30:19 AM8/19/24
to dhabale...@gmail.com, adwor...@googlegroups.com
Hi,

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

App Campaign Legacy (installs) are not supported in the Google Ads API but are supported in the UI. From the UI, I can see that the subtype of the campaign in which you are trying to create the ad is 'App installs'. So, this could be one of the reasons that you are encountering the 'VALUE_MUST_BE_UNSET' error. 

I would recommend you refer to this guide on 'App Campaigns', which has details and steps regarding the App campaign creation. Also, you may refer to this Code Example that illustrates the creation of an app campaign from beginning to end.

I hope this helps.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vF23R:ref" (ADR-00263739)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages