Thanks for your reply...
I've tried without sending the resource_name. As I already said, I didn't
use any client library, gRPC. I'm just using a simple CURL REST API. I'm
trying with my test manager accounts.

Here I've attached my request details.

*CURL *: 
*https://googleads.googleapis.com/v6/customers/4259994445/adGroupAds:mutate
<https://googleads.googleapis.com/v6/customers/4259994445/adGroupAds:mutate>*

*Request Body :*
{
  "operations": [
    {
    "create": {
        "status": "PAUSED",
        "ad": {
            "type": "EXPANDED_TEXT_AD",
            "name": "Mitrah test Ad"
        },
        "ad_group": "customers/4259994445/adGroups/117595323823"
      }
    }
  ]
}

*Response:*
400 Error with the following response.
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "
type.googleapis.com/google.ads.googleads.v6.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "mutateError": "RESOURCE_NOT_FOUND"
                        },
                        "message": "Resource was not found.",
                        "trigger": {
                            "stringValue": "<null>"
                        },
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                },
                                {
                                    "fieldName": "create"
                                },
                                {
                                    "fieldName": "resource_name"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
I've passed the developer token & login-customer-id as mentioned in the API
documentation. I'm not sure what I'm using.
What does the above error point to? Where my CURL is not correct or Do I
need to pass resource_name param in the request body? Let me know your
thoughts. Thanks in advance.

On Wed, Mar 10, 2021 at 9:27 AM Google Ads API Forum Advisor Prod <
adsapiforumadvi...@gmail.com> wrote:

> Hi,
>
> Thank you for posting your concern.
>
> Please see my answer below for each item:
> 1. Create operation is not supported in AdService
> <https://developers.google.com/google-ads/api/reference/rpc/v6/AdService>,
> with this, you need to use the AdGroupAdService
> <https://developers.google.com/google-ads/api/reference/rpc/v6/AdGroupAdService>
> instead for creating ads.
>
> 2. As discussed on the *Key Point* section of this document
> <https://developers.google.com/google-ads/api/docs/rest/common/mutate#create>
> on constructing create operation in REST API, you don't need to specify a
> *resourceName* or ID and this is the possible reason why the error
> occurred. With this, please try not setting *resourceName *in the API
> request.
>
> Also, our team doesn't have sample CURL for your use-case and you will
> need to follow this document
> <https://developers.google.com/google-ads/api/docs/rest/overview> in
> order to construct API quest. Let me know if you have further questions.
>
> Regards,
> [image: Google Logo]
> Ernie John Blanca Tacata
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2DMN7A:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CA%2B7exT8uTkgqHYRq%3DwQCbAya984uZQuaRj97HS95Pp%3DAJEpkEw%40mail.gmail.com.

Reply via email to