Immutable AppAdInfo

181 views
Skip to first unread message

Jayden Zangari

unread,
May 8, 2022, 6:32:14 PM5/8/22
to Google Ads API and AdWords API Forum
Hey Google team,

We have a question about how to edit ads for app campaigns through the Google Ads API. We set up an app campaign in our test account with some headlines. When we tried to update those headlines the request failed saying that the field was immutable (I'll link the request body and response in this thread). Upon further inspection, it looks like that app ads are immutable (in our case we were using an installs ad which I believe is the AppAd type).

We noticed however that app ads are mutable in the Google Ads UI (we tried manually adding and removing some headlines). Is there a way to also do this via the Google Ads API given that this can be done in the UI?

Thanks in advance.

Request body:
https://googleads.googleapis.com/v10/customers/9896484741/adGroupAds:mutate

 {
     "operations": [{
         "update": {
             "resourceName": "customers/9896484741/adGroupAds/135247073269~593634212839",
             "ad": {
                 "appAd": {
                     "headlines": [{
                         "text": "test3"
                     }]
                 }
             }
         },
         "update_mask": {
             "paths": "ad.app_ad.headlines"
         }
     }],
     "response_content_type": "MUTABLE_RESOURCE"
 }

Request 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": {
                    "requestError": "IMMUTABLE_FIELD"
                },
                "message": "Field 'ad.app_ad.headlines' cannot be modified by 'UPDATE' operation.",
                "location": {
                    "fieldPathElements": [{
                            "fieldName": "operations",
                            "index": 0
                        },
                        {
                            "fieldName": "update"
                        },
                        {
                            "fieldName": "ad"
                        },
                        {
                            "fieldName": "app_ad"
                        },
                        {
                            "fieldName": "headlines"
                        }
                    ]
                }
            }],
            "requestId": "yVJpbS5zpxtBL33znXyXgw"
        }]
    }
}

Google Ads API Forum Advisor

unread,
May 10, 2022, 9:58:53 AM5/10/22
to adwor...@googlegroups.com
Hi Jayden,

Using AdService I was able to change the ad like this:
curl -i --request POST https://googleads.googleapis.com/v10/customers/<OPERATING_CUSTOMER_PLACEHOLDER>/ads:mutate \
--header "Content-Type: application/json" \
--header "login-customer-id: <LOGIN_CUSTOMER_ID_PLACEHOLDER>" \
--header "developer-token: <DEVELOPER_TOKEN_PLACEHOLDER>" \
--header "Authorization: Bearer <ACCESS_TOKEN_PLACEHOLDER>" \
--data '{
    "operations": [
      { 
        "updateMask": "app_ad.headlines",
            "update": {
   
"resourceName": "customers/<OPERATING_CUSTOMER_PLACEHOLDER>/ads/<AD_ID_PLACEHOLDER>",

 "appAd": {
                     "headlines": [{
                         "text": "test3",},{
                         "text": "test4",},{
                         "text": "test5",},                     ]
                 }


  }


        },
    ],
"responseContentType": "MUTABLE_RESOURCE"
}
'

Let me bring up with my team whether we support mutating an App Ad via AdService. We will get back to you as soon as possible.

Regards,

Google Logo
Aryeh
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aqs5V:ref

Jayden Zangari

unread,
May 10, 2022, 9:22:43 PM5/10/22
to Google Ads API and AdWords API Forum
Thanks for the response Aryeh,

Directly modifying the AppAd rather than the Ad seems to work. I am now able to change headlines using the request you gave.

Google Ads API Forum Advisor

unread,
May 16, 2022, 4:55:01 PM5/16/22
to adwor...@googlegroups.com
Hi Jayden,

My team told me that API behaviour typically overrides the docs, so I'm assuming that our docs are outdated. You may rely on AdService to mutate your AppAds.
Reply all
Reply to author
Forward
0 new messages