error RESOURCE_NOT_FOUND while creating Ad

49 views
Skip to first unread message

Noud Adrichem

unread,
Jul 22, 2020, 10:20:14 AM7/22/20
to AdWords API and Google Ads API Forum
I'm getting an error that the Resource I'm creating an ad with is not found. While in the UI and in the fetching of Ad Groups it's clearly there. ..

Info
The error response:
"error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT",
    "details": [
        {
            "errors": [
                {
                    "errorCode": {
                        "mutateError": "RESOURCE_NOT_FOUND"
                    },
                    "message": "Resource was not found.",
                    "trigger": {
                        "stringValue": "AdGroupId: 78537431438"
                    },
                    "location": {
                        "fieldPathElements": [
                            {
                                "fieldName": "operations",
                                "index": "0"
                            },
                            {
                                "fieldName": "create"
                            },
                            {
                                "fieldName": "ad_group"
                            }


Some of the URL params of the resource in ads.google.com:
?campaignId=6464812751
&adGroupId=78537431438
&ocid=
&euid=
&__u=
&uscid=
&__c=
&authuser=1
&subid=

The IDs I'm using to create the ad.
{
"campaignId": "6464812751",
"adGroupId": "78537431438",
"accountId": "HIDDEN"

I'd like to know why this issue is occurring because it worked last week..?



Noud Adrichem

unread,
Jul 22, 2020, 10:26:05 AM7/22/20
to AdWords API and Google Ads API Forum
This is the create operation I'm sending to 'adGroupAds:mutate' endpoint. Using V2

{
    "create": {
        "status": "ENABLED",
        "ad_group": "customers/1941479551/adGroups/78537431438",
        "ad": {
            "name": "gads_test_drie_KCS__300x250-NL-2020-07-22_15:48:37",
            "finalUrls": [
                "https://bannerwise.io"
            ],
            "type": "HTML5_UPLOAD_AD",
            "display_upload_ad": {
                "display_upload_product_type": "HTML5_UPLOAD_AD",
                "media_bundle": {
                    "asset": "customers/1941479551/assets/9655229657"
                }
            }
        }
    }
}


Op woensdag 22 juli 2020 om 16:20:14 UTC+2 schreef Noud Adrichem:

Noud Adrichem

unread,
Jul 22, 2020, 11:17:22 AM7/22/20
to AdWords API and Google Ads API Forum
I migrated to v4 and same error still occurs.

Op woensdag 22 juli 2020 om 16:26:05 UTC+2 schreef Noud Adrichem:

Google Ads API Forum Advisor Prod

unread,
Jul 22, 2020, 1:48:09 PM7/22/20
to no...@bannerwise.io, adwor...@googlegroups.com
Hi Noud,

Thank you for reaching out to us. I see that you're encountering a Resource not found error while using the API. I took a closer look at your logs and it looks like you're trying to pull the ad group 78537431438 from account 1941479551, which is an MCC account, instead of 128-186-0177, which is the account that holds this ad group. Since MCC accounts manage customer accounts and customer accounts manage ad groups/campaigns, if you try to access an ad group under the MCC account instead of the account it exists in, you'll receive a Resource Not Found error. Could you try and use account 128-186-0177 instead of 1941479551 to pull the ad group and let me know if you still encounter issues?

Thank you,
Bryan, Google Ads API Team

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