Hi, I'm trying to add a label to an existing campaign via this guide (Note: 
I'm using Google Ads API *V8*): 
https://developers.google.com/google-ads/api/docs/reporting/labels#c

I have also tried the C# library Example --> CampaignManagement --> 
AddCampaignLabels.cs

Both ways I encountered the same error: *Request contains an invalid 
argument*

Can you point out what I did wrong here? Thanks in advance!

summary.log:
GoogleAds.SummaryRequestLogs Warning: 1 : [2022-02-02 03:01:50Z] - Request 
made: Host: https://googleads.googleapis.com, Method: 
/google.ads.googleads.v8.services.CampaignLabelService/MutateCampaignLabels, 
ClientCustomerID: XXXXXX,  RequestID: IjtIHiJzLCZDadz4h-R9tw, IsFault: 
True, FaultMessage: Status(StatusCode="InvalidArgument", Detail="Request 
contains an invalid argument.", 
DebugException="Grpc.Core.Internal.CoreErrorDetailException: 
{"created":"@1643770909.948000000","description":"Error received from peer 
ipv4:142.251.33.170:443","file":"..\..\..\src\core\lib\surface\call.cc","file_line":1068,"grpc_message":"Request
 
contains an invalid argument.","grpc_status":3}")

details.log:
Method Name: 
/google.ads.googleads.v8.services.CampaignLabelService/MutateCampaignLabels
Host: https://googleads.googleapis.com
Headers: {
  "x-goog-api-client": "gl-dotnet/3.1.0 gapic/10.0.0 
gax/3.6.0+4899a6a9b9fd9ed69278104965027832c556038b grpc/2.41.0",
  "developer-token": "REDACTED",
  "login-customer-id": "[GoogleAccountId]",
  "x-goog-request-params": "customer_id=[customerId]"
}

{ "customerId": "[customerId]", "operations": [ { "create": { "campaign": 
"customers/[customerId]/campaigns/[campaignId]", "label": 
"customers/[customerId]/labels/1" } } ] }

Response
--------
Headers: {
  "request-id": "IjtIHiJzLCZDadz4h-R9tw",
  "date": "Wed, 02 Feb 2022 03:01:49 GMT",
  "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; 
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; 
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; 
v=\"46,43\"",
  "google.ads.googleads.v8.errors.googleadsfailure-bin": 
"CkYKAjgDEhdSZXNvdXJjZSB3YXMgbm90IGZvdW5kLhoCEAEiIxIOCgpvcGVyYXRpb25zGAASCAoGY3JlYXRlEgcKBWxhYmVsEhZJanRJSGlKekxDWkRhZHo0aC1SOXR3",
  "grpc-status-details-bin": 
"CAMSJVJlcXVlc3QgY29udGFpbnMgYW4gaW52YWxpZCBhcmd1bWVudC4apwEKQ3R5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLmFkcy5nb29nbGVhZHMudjguZXJyb3JzLkdvb2dsZUFkc0ZhaWx1cmUSYApGCgI4AxIXUmVzb3VyY2Ugd2FzIG5vdCBmb3VuZC4aAhABIiMSDgoKb3BlcmF0aW9ucxgAEggKBmNyZWF0ZRIHCgVsYWJlbBIWSWp0SUhpSnpMQ1pEYWR6NGgtUjl0dw=="
}

Fault: {
  "StatusCode": 3,
  "Details": "Request contains an invalid argument.",
  "RequestId": "IjtIHiJzLCZDadz4h-R9tw",
  "Failure": {
    "errors": [
      {
        "errorCode": {
          "mutateError": "RESOURCE_NOT_FOUND"
        },
        "message": "Resource was not found.",
        "trigger": {
          "int64Value": "1"
        },
        "location": {
          "fieldPathElements": [
            {
              "fieldName": "operations",
              "index": 0
            },
            {
              "fieldName": "create"
            },
            {
              "fieldName": "label"
            }
          ]
        }
      }
    ],
    "requestId": "IjtIHiJzLCZDadz4h-R9tw"
  }
}
----------------END API CALL----------------

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d810f718-0611-4e55-87c6-e618f74bba17n%40googlegroups.com.
  • Is... pchu
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to