Creating Dynamic Search Ads Campaign - errors = RESOURCE_NOT_FOUND

93 views
Skip to first unread message

Darshan Dhabale

unread,
Jul 29, 2024, 5:17:30 AM7/29/24
to Google Ads API and AdWords API Forum
I understand I need a feed to create these types of campaigns and ads, so I created one and added items to it and passed it in the feeds array, but it throws RESOURCE_NOT_FOUND for the feed. I am using REST because I have a go application. Thanks for your help.

Here is the curl-
curl --location 'https://googleads.googleapis.com/v16/customers/4926841893/campaigns:mutate' \
--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id: 3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ya29.a0AXooCgtwzrs81z1hxZc4bTEspQklcPN392Fv9As7TuVOJLxMtQsJ08lo6jFhIbMR79DE4oc9x-OAtN0Vkgj9Q-BU0m2Eh12Dt-Kjb5Df_XQCvww3UtI2cl-zDqvSaO_pPgPUndc4hYlV_3af32_HaIuqvvEi-AIaP7QfaCgYKAcMSARMSFQHGX2MiTLc7Bd3tJdvYE32ExmM-ew0171' \
--data '{
    "operations": [
        {
            "create": {
                "name": "Dynamic search campaign",
                "status": "PAUSED",
                "campaignBudget": "customers/4926841893/campaignBudgets/13757766883",
                "advertisingChannelType": "SEARCH",
                "networkSettings": {
                    "targetGoogleSearch": true,
                    "targetSearchNetwork": true,
                    "targetContentNetwork": true,
                    "targetPartnerSearchNetwork": false
                },
                "target_spend": {},
                "dynamicSearchAdsSetting": {
                    "domainName": "example.com",
                    "languageCode": "en",
                    "feeds": [
                        "customers/4926841893/feeds/443568318"
                    ],
                    "useSuppliedUrlsOnly": true
                }
            }
        }
    ]
}'

here is the response
{
    "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": {
                            "mutateError": "RESOURCE_NOT_FOUND"
                        },
                        "message": "Resource was not found.",
                        "trigger": {
                            "int64Value": "443568318"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "dynamic_search_ads_setting"
                                },
                                {
                                    "fieldName": "feeds"
                                }
                            ]
                        }
                    }
                ],
                "requestId": "q_CzJvkVU-ON-3f8MVJ-Ng"
            }
        ]
    }
}

Google Ads API Forum Advisor

unread,
Jul 29, 2024, 11:29:01 AM7/29/24
to dhabale...@gmail.com, adwor...@googlegroups.com

Hi,

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

We verified the provided logs and found that the customer field that is associated with the id ‘443568318’ doesn’t exist. So as per your request, you should create the customer.feeds first and then add the respective customer feed resource name while creating the campaign to avoid this error. 

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

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!
 


Darshan Dhabale

unread,
Jul 31, 2024, 4:35:44 AM7/31/24
to Google Ads API and AdWords API Forum
Thanks for your response.
I checked my ads dashboard, I do have a feed there with the id '443568318'. Please refer the screenshot. The name of the feed is "Feed Name" and its last in the list.
Here is the curl I am using to create a feed, it returns success.
curl --location 'https://googleads.googleapis.com/v17/customers/4926841893/feeds:mutate' \

--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id: 3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ya29.a0AXooCgtMIpcIeRjl2Bm544l7KM6R_7gin4V4AhTuIhjH-ZtBovo-JD17RCfjth6PWd3qgtW5llr0ycjuvjL_ENFjGtSH9pacdY5vIKj4WmsUufeEw9kBdj8tsKtCpw-G6nvSxzbuE9FxYH7LwyohDeSuuxWJCHUX_ZU9aCgYKAV4SARMSFQHGX2MinpYLgJAs6edb9IJAnh5Y1Q0171' \
--data '{
    "operations": [
        {
            "create": {
                "name": "Dynamic Search Ads Page Feed 2",
                "attributes": [
                    {
                        "type": "URL_LIST",
                        "name": "Page URLs"
                    },
                    {
                        "type": "STRING_LIST",
                        "name": "Labels"
                    }
                ]
            }
        }
    ],
    "responseContentType":"MUTABLE_RESOURCE"
}'

Thanks for your help
Screenshot from 2024-07-30 23-58-19.png

Google Ads API Forum Advisor

unread,
Jul 31, 2024, 6:39:41 PM7/31/24
to dhabale...@gmail.com, adwor...@googlegroups.com
Hi,

I have raised your concern with the rest of our team and one of my teammates will reach out to you once we have an update. Meanwhile, your patience is appreciated. 

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

Thanks,
 
Google Logo Google Ads API Team


Google Ads API Forum Advisor

unread,
Aug 1, 2024, 2:29:38 PM8/1/24
to dhabale...@gmail.com, adwor...@googlegroups.com
Hey Darshan,

Hope you're well! I've taken a look at the information you provided, and I believe you're using the incorrect endpoint to create a page feed for your DSA. I recommend taking a look at the "Dynamic Search Ads Page Feeds" guide, which explains the steps for creating a page feed asset that you can reference in your dynamic search ad setting. So rather than creating a customer feed using the "/customers/.../feeds:mutate" endpoints, you'd create a feed asset using the "/customers/.../assets:mutate" endpoint and populating the "pageFeedAsset" field.

Hope this helps.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vEHH3:ref" (ADR-00259939)

Thanks,
 
Google Logo
Laura Chevalier
Google Ads API Team


Darshan Dhabale

unread,
Aug 5, 2024, 4:52:33 AM8/5/24
to Google Ads API and AdWords API Forum

Hi Laura,
I created a pageFeedAsset like you suggested with the following request. But the resource name it gave me was "customers/4926841893/assets/154931386256", and when I pass it in the feeds array while creating a DSA campaign, I get an error saying the format should be "customers/4926841893/feeds/feed_id" and not "customers/4926841893/assets/asset_id"

Page Feed Asset creation request -
curl --location 'https://googleads.googleapis.com/v17/customers/4926841893/assets:mutate' \

--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id: 3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ya29.a0AcM612yE9ASuh9xK8Axb2hAed3XIVGON_gaYViM7VFp43CtBsMHTh-dBEjBFUxErm84GVSEYn69efVY-RMMjbQoWHqAQ3VJHf7dmrlOPTLK0zkB3ROSqZFjaQAMgp1Nur_J4-yyHv1s8gsFkY7azSDi_iSsgTtSX3fyLaCgYKAa0SARMSFQHGX2MiI6fMYeqYsWDF4vdHhc3OGg0171' \
--data '{
    "operations": [
        {
            "create": {
                "type": "PAGE_FEED",
                "pageFeedAsset": {
                    "pageUrl": "https://example.com",
                    "labels": [
                        "example",
                        "example1",
                        "example2",
                        "example3"
                    ]
                }
            }
        }
    ]
}'

DSA campaign creation request
curl --location 'https://googleads.googleapis.com/v16/customers/4926841893/campaigns:mutate' \

--header 'developer-token: hN6dsqjNmj3tWdITcPd_Qg' \
--header 'login-customer-id: 3263459376' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ya29.a0AcM612xwpFK4yVTBfI6NyyLESMtuxYtYv37qOhCJJfA-6bdP8U_8yRHEnrjDZK5fG3CFU8WPvBeaQr4Gvwc_IjUPlYx4mQCOSLVBVjJcCwN_MbrViBwY6iwao-9--N6VblCeDa95OZVVNYdvMDTZAV8-7Qw40RDjL1dvaCgYKAXkSARMSFQHGX2Mi9rNDpd815v_DMZukGcQKaQ0171' \
--data '{
    "operations": [
        {
            "create": {

                "name": "Dynamic search campaign",
                "status": "PAUSED",
                "campaignBudget": "customers/4926841893/campaignBudgets/13757766883",
                "advertisingChannelType": "SEARCH",
                "networkSettings": {
                    "targetGoogleSearch": true,
                    "targetSearchNetwork": true,
                    "targetContentNetwork": true,
                    "targetPartnerSearchNetwork": false
                },
                "target_spend": {},
                "dynamicSearchAdsSetting": {
                    "domainName": "example.com",
                    "languageCode": "en",
                    "feeds": [
                        "customers/4926841893/assets/154931386256"
                    ],
                    "useSuppliedUrlsOnly": true
                }
            }
        }
    ]
}'

Thanks for your support

Google Ads API Forum Advisor

unread,
Aug 5, 2024, 8:44:33 AM8/5/24
to dhabale...@gmail.com, adwor...@googlegroups.com
Hey Darshan,

Thanks for giving that a try. I believe you're getting closer, but based on the guide I shared, it looks like your next step after creating the asset is to create an AssetSet containing that asset, and attach that AssetSet to the campaign. I recommend reading through that full guide, and reaching back out if anything further seems to be amiss.
Reply all
Reply to author
Forward
0 new messages